-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
30 lines (20 loc) · 815 Bytes
/
app.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
const express = require("express");
const cors = require("cors");
const collectionsRouter = require("./routes/collections");
const swapsRouter = require("./routes/swaps");
const reviewRouter = require("./routes/reviewRouter");
const wishlistRouter = require("./routes/wishlistRouter");
const roomsRouter = require("./routes/rooms");
const bookRatingsRouter = require("./routes/bookRatingsRouter");
const logger = require("./middleware/logger");
const app = express();
app.use(cors());
app.use(express.json());
app.use(logger);
app.use("/swaps", swapsRouter);
app.use("/reviews", reviewRouter);
app.use("/collections", collectionsRouter);
app.use("/rooms", roomsRouter);
app.use("/wishlists", wishlistRouter);
app.use("/bookratings", bookRatingsRouter);
module.exports = app;