Goblin Base Server is an open-source backend based on Node.js, Redis and MongoDB made for game/web/apps developers. It's scalable enough to cover thousands of requests per second, tens of thousands DAU, and provide a comfortable realtime multiplayer for a growing player base.
This repository represents basic usage of Goblin Base Server implementing it with default configurations and a default set of Cloud Functions.
- Clone or download this repository;
- Install and run software: Node.js, Redis and MongoDB of latest versions;
- If you on Windows - try to install this Redis or just deploy cloud Redis for free;
- Also you can try a cloud MongoDB instead of local.
- Edit preferences file
preferences.json
:START_AT_HOST
andSTART_AT_PORT
- where to run server.127.0.0.1
for localhost and0.0.0.0
for public;- Point the
MONGODB_HOST
,MONGODB_PORT
,MONGODB_DATABASE_NAME
,REDIS_HOST
andREDIS_PORT
to connect to; HMAC_SECRET
stands for communication protection. You can leave it default for development purposes;TURN_ON_CORS
keep it true if no reverse proxy used.
- Actually run the Server:
$ cd goblin-base-server-bootstrap && node index.js
; - Use pm2 if possible:
$ pm2 ./pm2process.json
All cloud functions are stored at cloudFunctions
directory of the repository. You can put your own - they will be caught up automatically. Don't make subdirectories - or just modify index.js
code to scan subdirectories too.
- Goblin Base Server's repository: https://github.com/red-machine-games/goblin-base-server
- Documentation: https://goblinserver.com/doc
License of this particular repository: MIT