mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-21 21:09:22 +00:00
Can load configuration from custom file
This commit is contained in:
parent
1a6cbf6dcb
commit
2ad5a8e038
@ -17,8 +17,10 @@ console.info("Comunic API v6\t@author Pierre HUBERT\t2019-" + new Date().getFull
|
|||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
|
|
||||||
console.info("Load configuration...");
|
const confFile = process.argv.length < 3 ? "config.json" : process.argv[2];
|
||||||
ConfigurationHelper.loadConf("config.json");
|
|
||||||
|
console.info("Load configuration from "+confFile+"...");
|
||||||
|
ConfigurationHelper.loadConf(confFile);
|
||||||
|
|
||||||
console.info("Connect to database");
|
console.info("Connect to database");
|
||||||
await DatabaseHelper.connect();
|
await DatabaseHelper.connect();
|
||||||
|
@ -35,7 +35,7 @@ module.exports = {
|
|||||||
|
|
||||||
// Allow live-reload
|
// Allow live-reload
|
||||||
new WebpackShellPlugin({
|
new WebpackShellPlugin({
|
||||||
onBuildEnd: ["node_modules/.bin/nodemon build/main.js"]
|
onBuildEnd: ["node_modules/.bin/nodemon"]
|
||||||
})
|
})
|
||||||
|
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user