-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
42 lines (38 loc) · 1.52 KB
/
index.js
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
35
36
37
38
39
40
41
42
const express = require("express");
const cors = require("cors");
const meetingRouter = require("./controllers/meeting.controller");
const quizRouter = require("./controllers/quiz.controller");
const paymentRouter = require("./controllers/payment.controller");
const userRouter = require("./controllers/user.controller");
const referralRouter = require("./controllers/referral.controller");
const coinsRouter = require("./controllers/coins.controller");
const teacherRouter = require("./controllers/teachers.controller");
const logsRouter = require("./controllers/logs.controller");
const questionRouter = require("./controllers/question.controller");
const studentRouter = require("./controllers/student.controller");
const pointagramRouter = require("./controllers/pointagram.controller");
const zoomRouter = require("./controllers/zoom.controller");
const app = express();
app.use(express.json());
app.use(cors());
const PORT = process.env.PORT || 8080;
app.use("/meeting", meetingRouter);
app.use("/quiz", quizRouter);
app.use("/user", userRouter);
app.use("/", paymentRouter);
app.use("/referral", referralRouter);
app.use("/", logsRouter);
app.use("/", questionRouter);
app.use("/teachers", teacherRouter);
app.use("/student", studentRouter);
app.use("/pointagram", pointagramRouter);
app.use("/coins", coinsRouter);
app.use("/zoom", zoomRouter);
app.get("/", (req, res) => {
res.status(200).send({
message: "Server Started 🐱👤",
});
});
app.listen(PORT, () => {
console.log(`Server Started 🎈 http://localhost:${PORT}`);
});