actual-server/load-config.js

18 lines
356 B
JavaScript
Raw Normal View History

2022-04-29 02:09:40 +00:00
let config;
try {
config = require('./config');
} catch (e) {
2022-04-29 14:35:13 +00:00
let fs = require('fs');
2022-04-29 14:48:58 +00:00
let { join } = require('path');
2022-04-29 15:10:20 +00:00
let root = fs.existsSync('/data') ? '/data' : __dirname;
2022-04-29 14:35:13 +00:00
2022-04-29 02:09:40 +00:00
config = {
mode: 'development',
port: 5006,
2022-04-29 14:48:58 +00:00
serverFiles: join(root, 'server-files'),
userFiles: join(root, 'user-files')
2022-04-29 02:09:40 +00:00
};
}
module.exports = config;