This is the server-side repository of the Battleship2.0
game.
The client (game) repository is hosted at https://github.com/battleship2/battleship2.0-client.
The server relies on several well-known libraries such as:
Important note about Gulp: The project is configured to use Gulp v4 and above. Please refer to this link to check how to configure it in your environment.
From the project's root directory, type the following commands:
npm install
-> Install the required dependenciesgulp
orgulp serve
ornpm start
-> Start the project using nodemon and bunyan to have a bulletproof server carrying fabulous logging
While we do our best to get the whole project tested, do not hesitate to PR us if you ever find a bug. To launch all the tests, type the following command:
gulp test
or npm test
First, run the server using the Launch section above.
Then, in your favorite browser, open the index.html
file located under www
to launch a 4 players game.
$ docker-compose up --build
To build or re-build the image, from the root of the project, type the following command:
$ docker build -t battleship2/server .
To run a container
$ docker run -p <any port>:9001 -d battleship2/server