mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Move loading of config in master to startServer
Move the loading of the config file in the master server to the startServer function. Remove config.json.test as it's no longer needed.
This commit is contained in:
1 parent
651b09b613
commit
35546b4b18
4 files changed
+14
-53
No files matched your search
@@ -28,8 +28,7 @@ const moment = require("moment");
|
||||
const request = require("request");
|
||||
|
||||
// constants
|
||||
console.log(`Requiring config from ${args.config || './config'}`);
|
||||
const config = require(args.config || './config');
|
||||
let config = {};
|
||||
|
||||
// homebrew modules
|
||||
const generateSSLcert = require("lib/generateSSLcert");
|
||||
@@ -865,6 +864,9 @@ async function startServer() {
|
||||
// add better stack traces on promise rejection
|
||||
process.on('unhandledRejection', r => console.log(r));
|
||||
|
||||
console.log(`Requiring config from ${args.config || './config'}`);
|
||||
config = require(args.config || './config');
|
||||
|
||||
/** Sync */
|
||||
function randomStringAsBase64Url(size) {
|
||||
return base64url(crypto.randomBytes(size));
|
||||
@@ -964,6 +966,7 @@ module.exports = {
|
||||
|
||||
// For testing only
|
||||
_db: db,
|
||||
_config: config,
|
||||
}
|
||||
|
||||
if (module === require.main) {
|
||||
|
||||
Reference in new issue
Block a user