changed app.js to app.mjs

This commit is contained in:
2020-10-07 19:46:57 +02:00
parent b843f8de4b
commit 48bb30243c
2 changed files with 1 additions and 1 deletions

24
app.js
View File

@@ -1,24 +0,0 @@
import * as config from "./config/index.js";
const { port, dbPass, cookiesSecret } = config;
import express from "express";
const app = express();
import loaders from "./loaders/index.js";
//
// Server init function
//
async function startServer() {
await loaders({
expressApp: app,
dbPass: dbPass,
secret: cookiesSecret,
});
app.listen(port, (err) => {
if (err) {
console.log("Server Startup Failed");
return;
}
console.log("Server is running");
});
}
startServer();