Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
fix(config): make config precedence consistent with documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Sep 11, 2020
1 parent 56c515b commit b1072a1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

0 comments on commit b1072a1

Please sign in to comment.