-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
37 lines (36 loc) · 979 Bytes
/
Copy pathapp.js
File metadata and controls
37 lines (36 loc) · 979 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
35
36
37
import { httpServer, app } from "./api/server.js";
import { createRedis, createRoom } from "./api/room.js";
import {
addGame,
getGames,
getGame,
createGame,
createRoomDb,
startGame1,
startGame2,
submitQuiz,
userList,
votePerson,
addPoints,
} from "./api/game.js";
import { signUp, login } from "./api/auth.js";
const port = process.env.PORT || 5000;
app.get("/", (req, res) => {
res.send("Server PAllu is up");
});
app.post("/signup", signUp);
app.post("/login", login);
app.post("/createGame", createGame);
app.post("/getGames", getGames);
app.post("/addGame", addGame);
app.post("/getGame", getGame);
app.post("/createRoom", createRoom);
app.get("/redis", createRedis);
app.post("/createRoomDb", createRoomDb);
app.post("/startGame1", startGame1);
app.post("/startGame2", startGame2);
app.post("/submitQuiz", submitQuiz);
app.post("/userList", userList);
app.post("/votePerson", votePerson);
app.post("/addPoints", addPoints);
httpServer.listen(port);