-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
31 lines (26 loc) · 909 Bytes
/
server.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
const express = require("express");
const app = express();
const path = require("path");
const cookieParser = require("cookie-parser");
const bodyparser = require("body-parser");
const PORT = process.env.PORT || 8000;
app.use(express.static("public"));
app.set("view engine", "ejs");
app.use(cookieParser());
app.use(bodyparser.urlencoded({ extended: false }));
app.use(bodyparser.json());
const home = require("./routes/index");
const list = require("./routes/list/list");
const register = require("./routes/register/register");
const stock = require("./routes/stocks/stock");
const details = require("./routes/details/details");
const customer = require("./routes/customers/customer");
app.use(home);
app.use("/list", list);
app.use("/register", register);
app.use("/stocks", stock);
app.use(details);
app.use("/customer", customer);
app.listen(PORT, () => {
console.log(`Listining on ${PORT}`);
});