Skip to content
Stefano Balietti edited this page Apr 12, 2020 · 5 revisions

Digital Ocean Mini FAQ

  • How do I login into my server?

You will need to open an SSH (Secure SHell). Then you type:

ssh root@my_server_address
  • What is the address of my server?

You can find it in your Digital Ocean dashboard.

  • How do I upload my game to the server?

The easiest one is to use git. Upload your code to a git repository (e.g., github or bitbucket) and then pull the code from the repository into the games directory of your nodeGame server.

Alternatively, you can look into bash commands such as scp or rsync.

  • How do I start my game?

First of all, you may want to remove the demo game:

rm nodegame-vXXX/games/ultimatum

where XXX is the actual version of nodeGame installed.

Then you need to restart nodeGame server. From the nodeGame installation folder type:

pm2 delete launcher
pm2 start launcher.js -- --default=yourGameName
  • What is pm2 and why should I use it?

Pm2 is a process manager: it makes sure the server is running even after you close the terminal and it will automatically restart it in case of a fatal error. It is recommended that you launch your node server with pm2.

  • OK, I used pm2, but where is the output of my server now?

Pm2 saves the logs under ~/.pm2/logs.

You can find more information about pm2 here:

http://pm2.keymetrics.io/docs/usage/quick-start/

  • Why do I see a blank page if I try to connect to my game?

You might have specified the wrong channel name (or no channel at all). This may happen happen, for example, if you manually copy your game from an existing directory.

To fix the blank screen, open file public/js/index.js and find the line containing node.connect. Make sure that the argument passed to the connect method matches the name of your channel. The name of the channel is specified in file channel/channe.settings.js and it usually matches the name of your game. For example, if your game is named ultimatum, the name of the channel would be /ultimatum/; so, the correct line should be: node.connect('/ultimatum').

Clone this wiki locally