-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
35 lines (30 loc) · 1.21 KB
/
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
31
32
33
34
35
const express = require("express");
const app = express();
const port = process.env.PORT || 8080;
const bodyParser = require("body-parser");
const cors = require("cors");
const path = require("path");
require("./model/db");
app.use(cors());
app.use(express.json({ limit: "4.5mb" }));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use("/api", require("./routers/work_management"));
app.use("/api", require("./routers/tpi"));
app.use("/api", require("./routers/tpi_summary"));
app.use("/api", require("./routers/product"));
app.use("/api", require("./routers/wm_target"));
app.use("/api", require("./routers/favourite_tpi"));
app.use("/api", require("./routers/tpi_info"));
app.use("/api", require("./routers/wm_info"));
app.use("/api", require("./routers/EcommerceCategory"));
app.use("/api", require("./routers/ECommerceItem"));
app.use("/api", require("./routers/Expense"));
app.use("/api", require("./routers/PhotoLibrary"));
app.use("/api", require("./routers/OnlineStore"));
app.use("/api", require("./routers/HomeRental"));
app.use("/api", require("./routers/Tpi_Items"));
app.use("/api", require("./routers/NewsPortal"));
app.listen(port, (req, res) => {
console.log("Server connected");
});