Proof of concept of a kanban style application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
673 B
Raw

const express=require("express");
const bodyParser=require("body-parser");
const config=require("config");
const { connectToDatabase } = require("./controller/MongoController.js");
const taskRoute=require("./route/TaskRoute");
const webapp=express();
connectToDatabase()
.then(()=>console.log("Database online"))
.catch(err=>console.error(err));
webapp.use(bodyParser.json());
webapp.use(config.express.baseUrl+"/task",taskRoute);
function startWebServer(){
if(config.util.getEnv('NODE_ENV') !== 'test') {
webapp.listen(
config.express.port,
()=>console.log("Web server started on port "+config.express.port)
);
}
}
startWebServer();
module.exports=webapp;