feat(db): prod sql connect setup more proper to handle errors as well

This commit is contained in:
2025-12-22 11:35:09 -06:00
parent 2c0a8608ac
commit a8c5aad833
6 changed files with 164 additions and 1 deletions

View File

@@ -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, () => {