Skip to content

Commit 3d9617a

Browse files
committed
UUID issue fixed
1 parent 8eac20c commit 3d9617a

3 files changed

Lines changed: 34 additions & 1 deletion

File tree

apps/http-backend/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { prismaClient } from "@repo/db/client";
44
import { NodeRegistry } from "@repo/nodes/nodeClinet";
55
import express from "express";
6+
import { userRouter } from "./routes/userRoutes/userRoutes.js";
67
const app = express()
78
// const main = async () => {
89
// try {
@@ -16,6 +17,8 @@ const app = express()
1617
// main().then(() => {
1718
// console.log("This log is from http Backend");
1819
// });
20+
21+
app.use("/user" , userRouter)
1922
const PORT= 3000
2023
async function startServer() {
2124
await NodeRegistry.registerAll()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { prismaClient } from "@repo/db";
2+
import { Express, Router } from "express";
3+
4+
const router : Router = Router();
5+
6+
router.post("/create" , async (req , res) =>{
7+
8+
// const Data = req.body;
9+
10+
// const {name , email , password} = req.body
11+
// console.log(Data)
12+
try {
13+
const user = await prismaClient.user.create({
14+
data : {
15+
name : "name",
16+
email : "email",
17+
password : "password"
18+
}
19+
})
20+
res.json({
21+
message : "Signup DOne",
22+
user
23+
})
24+
}
25+
catch(e){
26+
console.log("Detailed Error" , e)
27+
}
28+
})
29+
30+
export const userRouter = router ;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"root":["./src/index.ts","./src/routes/nodes.routes.ts"],"version":"5.7.3"}
1+
{"root":["./src/index.ts","./src/routes/nodes.routes.ts","./src/routes/userRoutes/userRoutes.ts"],"version":"5.7.3"}

0 commit comments

Comments
 (0)