-
Notifications
You must be signed in to change notification settings - Fork 18
Server Configuration v7
- status: complete
- version: 7.x
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
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.
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.
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.
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.
Go back to the wiki Home.
Copyright (C) 2021 Stefano Balietti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.