Skip to content

this silly app allows you to preview CS2 crosshairs of players by their steamid64, vanity url or crosshair code and make edits to them

License

Notifications You must be signed in to change notification settings

girlglock/cs2-crosshair

Repository files navigation

cs2-crosshair-viewer

this silly app allows you to preview CS2 crosshairs of players by their steamid64, vanity url or crosshair code and make edits to them.

Note

this is my first ever web app, i did my best to make it secure and easy to use, but i'm not a full stack developer so if you find anything critical to improve, please let me know or feel free to contribute :3

usage

You can view crosshairs directly using these URL patterns:

  • crosshair code: https://c.girlglock.com/{code}
  • steamID64: https://c.girlglock.com/{steamid64}
  • steam Profile: https://c.girlglock.com/profiles/{steamid64}
  • steam vanity: https://c.girlglock.com/id/{steamvanity}
  • leetify vanity: https://c.girlglock.com/{leetifyvanity}

examples

  • https://c.girlglock.com/CSGO-AJswe-2jNcK-nMpEQ-rHV5J-5JWAB
  • https://c.girlglock.com/76561198123456789
  • https://c.girlglock.com/profiles/76561198123456789
  • https://c.girlglock.com/id/somecoolsteamuser123
  • https://c.girlglock.com/ropz

requirements

  • nodejs ^14
  • PM2
  • nginx
  • git

Note

some assets like the staticCrosshairRenderer.js, backdround images and the pro-players.json file are being fetched from this repo to cut down the payload sent to the user. if you want to change them you need to edit the crosshair-preview.html template

deploying

1. clone and install dependencies

git clone https://github.com/girlglock/cs2-crosshair.git
cd cs2-crosshair
npm install

2. edit the config.js file to include your domain

const config = {
    port: 3001,
    host: 'c.girlglock.com', // replace with your domain that you pointed to your server
    domain: 'c.girlglock.com', // replace with your domain that you pointed to your server
    ...
};

3. start the app with PM2

pm2 start crosshair-ecosystem.config.js --env production
pm2 save
pm2 startup

this will start the app on http://127.0.0.1:3001.


4. set up nginx

  1. edit the crosshair.conf file with the domain you want to host the app on:
server {
    listen 80;
    server_name c.girlglock.com; // replace with your domain that you pointed to your server
    ...
}
  1. copy the crosshair.conf file to nginx:
sudo cp crosshair.conf /etc/nginx/sites-available/crosshair
sudo ln -s /etc/nginx/sites-available/crosshair /etc/nginx/sites-enabled/
  1. test nginx:
sudo nginx -t
sudo systemctl reload nginx

now your server will be live on the domain specified in the crosshair.conf file

for viewing logs

  • app logs:

    pm2 logs cs2-crosshair
  • nginx logs:

    tail -f /var/log/nginx/crosshair.error.log

ssl

sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d c.girlglock.com # replace with your domain that you pointed to your server

restarting, stopping and starting

  • to restart the server:

    pm2 restart cs2-crosshair
  • to stop the server:

    pm2 stop cs2-crosshair
  • to start the server:

    pm2 start cs2-crosshair

credits

About

this silly app allows you to preview CS2 crosshairs of players by their steamid64, vanity url or crosshair code and make edits to them

Topics

Resources

License

Stars

Watchers

Forks