fix(config): make config precedence consistent with documentation
This commit is contained in:
parent
56c515b153
commit
b1072a1f0e
15
server.js
15
server.js
|
@ -16,13 +16,16 @@ const blockList = Object.keys(syncloungeSocket.defaultConfig);
|
|||
const appConfig = config.get(null, blockList);
|
||||
console.log(appConfig);
|
||||
|
||||
const preStaticInjection = (router) => {
|
||||
// Add route for config
|
||||
router.get('/config.json', (req, res) => {
|
||||
res.json(appConfig);
|
||||
});
|
||||
};
|
||||
|
||||
const socketConfig = syncloungeSocket.getConfig();
|
||||
const router = syncloungeSocket.socketServer({
|
||||
syncloungeSocket.socketServer({
|
||||
...socketConfig,
|
||||
static_path: 'dist',
|
||||
});
|
||||
|
||||
// Add route for config
|
||||
router.get('/config.json', (req, res) => {
|
||||
res.json(appConfig);
|
||||
preStaticInjection,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue