Created
December 28, 2018 22:59
-
-
Save tarusharora/38439f22d9429e4b51d563dfb9d8cc63 to your computer and use it in GitHub Desktop.
App.js Basic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nconf = require('nconf'); | |
const server = require('./server'); | |
const { loadSettings } = require('./config/configurationAdaptor'); | |
const appSettingsPath = process.env.APP_SETTINGS_FILE_PATH; | |
loadSettings({ appSettingsPath }) | |
.then(() => { | |
// TODO Connect to DB, if any. | |
// Read the config property required for starting the server | |
const serverOptions = { | |
logSeverity: nconf.get('logSeverity'), | |
}; | |
server.createServer(serverOptions); | |
// TODO Start the server | |
}) | |
.catch((err) => { | |
console.log(err); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment