https://github.com/bsdavidson/simplescore
A simple Node server for adding a leaderboard functionality to a game.
https://github.com/bsdavidson/simplescore
Last synced: 11 months ago
JSON representation
A simple Node server for adding a leaderboard functionality to a game.
- Host: GitHub
- URL: https://github.com/bsdavidson/simplescore
- Owner: bsdavidson
- License: mit
- Created: 2015-05-02T00:20:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-05T07:53:25.000Z (over 10 years ago)
- Last Synced: 2024-04-14T22:21:02.216Z (over 2 years ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SimpleScore
A simple Node server for adding a leaderboard functionality to a game. It
provides an API to accept scores and return them for later display in the game.
For a demo, I modded my Deathbot 5000 game, [playable here][deathbot].
## Running the server
To run the server locally, you'll first need to be running a MongoDB server.
Then you can install the dependencies and run the server:
$ npm install
$ DB_URI=mongodb://127.0.0.1:27017/simpleserver_dev npm start
Then open http://127.0.0.1:8080/api.
To run tests:
$ DB_URI=mongodb://127.0.0.1:27017/simpleserver_test npm test
If you don't want to install Node and Mongo manually, you can run the server
using [Docker Compose]. Just run `docker-compose up` and the server will be
available on port 8080 on your Docker host machine (on a Mac using
docker-machine, you'll probably find it at http://192.168.99.100:8080/api).
[deathbot]: http://bsdavidson.github.io/deathbot5000/
[Docker Compose]: https://docs.docker.com/compose/