feat(db): prod sql connect setup more proper to handle errors as well
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import express from "express";
|
||||
import { connectProdSql } from "./src/prodSql/sqlConnection.controller.js";
|
||||
import { setupRoutes } from "./src/routeHandler.route.js";
|
||||
|
||||
const port = Number(process.env.PORT);
|
||||
@@ -6,6 +7,9 @@ export const baseUrl = "";
|
||||
const startApp = async () => {
|
||||
const app = express();
|
||||
|
||||
// start the connection to the prod sql server
|
||||
connectProdSql();
|
||||
|
||||
setupRoutes(baseUrl, app);
|
||||
|
||||
app.listen(port, () => {
|
||||
|
||||
Reference in New Issue
Block a user