Skip to content

Commit

Permalink
pre finale
Browse files Browse the repository at this point in the history
  • Loading branch information
YounessHassoune committed Jan 21, 2022
1 parent ecdca99 commit 5bec403
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
anonymous user GET / 200 Fri, 21 Jan 2022 16:33:35 GMT ::1
anonymous user GET / 200 Fri, 21 Jan 2022 16:33:50 GMT ::1
anonymous user GET /favicon.ico 200 Fri, 21 Jan 2022 16:33:54 GMT ::1
4 changes: 4 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { setBonusEveryMonth } from "@utils/calculate";
import { Jobs } from "@lib/jobs";
import morgan from "morgan";
import { loggerGetId, logger, loggerGetRole } from "@middlewares/logger";
import { Request, Response } from "express";

const job = new Jobs();
const app = express();
Expand All @@ -37,6 +38,9 @@ app.use("/api/admin", admin);
app.use("/api/deliverymanager", deliverymanager);
app.use("/api/manager", manager);
app.use("/api/driver", driver);
app.use('/', (req: Request, res: Response) => {
res.json('welcome to Marocship Api πŸš€πŸš€πŸš€')
})

app.get("/error", () => {
throw new Error("test error πŸ™ƒπŸ™ƒ");
Expand Down

0 comments on commit 5bec403

Please sign in to comment.