Skip to content
Snippets Groups Projects
Commit c9253860 authored by alrwasheda's avatar alrwasheda :speech_balloon:
Browse files

update server.ts with current changes

parent 06ad39c2
No related branches found
No related tags found
No related merge requests found
......@@ -6,13 +6,16 @@ import createInitialWorkerIfNotExists from "./db/createInitialWorker";
import showAllDBs from "./db/DB_Information/showAllDBs";
import showTables from "./db/DB_Information/showDBTables";
import showTableContent from "./db/DB_Information/showTableContent";
import runSeeders from "./db/seeder";
import accountsRouter from "./routes/accounts.routes";
import authRouter from "./routes/auth.routes";
import boatRoutes from "./routes/boatRoutes.routes";
let init = async () => {
//DB
const sequelize = await initializeDatabase();
await createInitialWorkerIfNotExists();
await runSeeders();
// server
const app = express();
app.use(express.json());
......@@ -22,6 +25,7 @@ let init = async () => {
app.get("/", (req, res) => res.send("hello in server"));
app.use("/", authRouter);
app.use("/", accountsRouter);
app.use("/", boatRoutes.showAllBoatsRouter);
//DB-information section
await showAllDBs(sequelize);
await showTables(sequelize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment