-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (25 loc) · 693 Bytes
/
index.js
File metadata and controls
34 lines (25 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const express = require("express");
const cors = require("cors");
const connectDB = require("./connection/db");
const router = require("./routes/formRoutes");
const app = express();
const port = process.env.PORT || 5000;
app.use(express.json());
app.use(cors(
// { origin: "https://my-indore-guide-fontend.vercel.app"}
));
connectDB();
app.get("/", (req, res) => {
res.json("hello");
});
app.get("/form", (req, res) => {
res.json("from");
});
app.use("/form/signup", router);
app.use("/form/auth", router);
app.use("/form/data", router);
// payment Routes
// app.use("/payment",paymentRouter)
app.listen(port, () => {
console.log(`Example app listening on port ${port}`);
});