Skip to content
Snippets Groups Projects
Commit d41e024b authored by Leander Tolksdorf's avatar Leander Tolksdorf
Browse files

remove exampleRouter

parent c214b879
No related branches found
No related tags found
No related merge requests found
import express, { Request, Response } from "express";
import validateToken from "../middleware/validateToken";
const exampleRouter = express.Router();
exampleRouter.get("/protected", validateToken, (req: Request, res: Response) =>
res.send("Data")
);
export default exampleRouter;
......@@ -6,8 +6,8 @@ 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 accountsRouter from "./routes/accounts.routes";
import authRouter from "./routes/auth.routes";
import exampleRouter from "./routes/example.routes";
let init = async () => {
//DB
......@@ -21,7 +21,7 @@ let init = async () => {
app.listen(port, () => console.log(`Server listening on port: ${port}\n`));
app.get("/", (req, res) => res.send("hello in server"));
app.use("/", authRouter);
app.use("/", exampleRouter);
app.use("/", accountsRouter);
//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