Server Configuration v7 - nodeGame/nodegame GitHub Wiki

  • status: complete
  • version: 7.x

Server Conf directory

Inside the installation directory of nodeGame you can find the default configuration directory: conf. Inside the conf directory the following files are available:

  • servernode.js
  • loggers.js
  • http.js
  • sio.js

servernode.js

This file configures the behavior of the nodeGame server, setting variables like the port, the games directory, the log directory, and the default settings for each channel.

The file must export a function taking as input parameter the current instance of the nodeGame Server (ServerNode class).

See the inline comments inside the default servernode.js configuration file for available options.

loggers.js

This file configures how much information is logged to console and to file system. The file must export a function taking as first input parameter the winston logger object, and as second parameter the path to the server log directory.

See the default loggers.js configuration file for a working example.

http.js

This file configures the basic routes of the Express HTTP server inside the nodeGame server.

The file must export a function taking as first input parameter the Express app and as second parameter a reference to the current instance of the nodeGame server object.

See the default http.js configuration file for a working example.

sio.js

This file configures the behavior of the Socket.IO server inside the nodeGame server.

The file must export a function taking as first input parameter the Socket.io server and as second parameter a reference to the current instance of the nodeGame server object.

See the default sio.js configuration file for a working example.

⚠️ **GitHub.com Fallback** ⚠️