Skip to content

Commit 7f73dff

Browse files
committed
feat: add users route
1 parent 08d1e33 commit 7f73dff

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import express from "express";
22
import dotenv from "dotenv";
33
import indexRouter from "./routes";
4+
import userRoute from "./routes/users";
45

56
dotenv.config();
67

78
const app = express();
89

910
app.use(express.json());
1011
app.use("/", indexRouter);
12+
app.use("/users", userRoute);
1113

1214
export default app;

src/routes/users.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Router } from "express";
2+
3+
const userRoute = Router();
4+
5+
userRoute.get("/", (_req, res) => {
6+
res.json({
7+
message: "This is users route",
8+
});
9+
});
10+
11+
export default userRoute;

0 commit comments

Comments
 (0)