feat(auth): added in the intital setup auth
This commit is contained in:
22
backend/server.ts
Normal file
22
backend/server.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import os from "node:os";
|
||||
import createApp from "./app.js";
|
||||
import { createLogger } from "./src/logger/logger.controller.js";
|
||||
import { connectProdSql } from "./src/prodSql/prodSqlConnection.controller.js";
|
||||
|
||||
const port = Number(process.env.PORT);
|
||||
|
||||
const start = async () => {
|
||||
const log = createLogger({ module: "system", subModule: "main start" });
|
||||
|
||||
connectProdSql();
|
||||
|
||||
const { app, baseUrl } = await createApp();
|
||||
|
||||
app.listen(port, async () => {
|
||||
log.info(
|
||||
`Listening on http://${os.hostname()}:${port}${baseUrl}, logging in ${process.env.LOG_LEVEL}`,
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
start();
|
||||
Reference in New Issue
Block a user