Online multiplayer game about pirates for USPGameDev
To run PSB (Pirate Ship Battles) you will need node.js and yarn installed in your machine.
- To get node.js follow the instructions found here, the latest node version will be fine.
- For the yarn installation follow this guide right here.
- Make sure your node version is equal or higher than 8.0, to do that run :
node --version
Execute:
yarn install
- Execute:
yarn serve
- This command will get the server up and run a bash script to minify the client .js files, thus getting a better load time.
yarn servep
- Will do the same as the previous command with the change that a python3 script will be used to minify, note the bash script is preferred.
yarn up
- This command is for the developers only, not changing anything about any file, just getting the server up.
If you are gonna use some webservice to run the server, run :
sudo nano /lib/systemd/system/pirates_game.service
Now, add
[Unit]
Description=pirates
After=network.target
[Service]
Environment=NODE_PORT=80
Type=simple
User=root
ExecStart=/usr/bin/yarn --cwd /home/ubuntu/pirates serve
Restart=on-failure
[Install]
WantedBy=multi-user.target
to the file and run :
sudo systemctl start pirates_game
- Open http://localhost:2000 in a modern browser
- Enjoy!
We have tests!! Just run :
yarn test
And all our automated unit tests should run and help you see if something broke. We use Jest as our test API.
Any questions, please contact -@GuilhermeVieira.