-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.js
25 lines (22 loc) · 1.09 KB
/
controller.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
const express = require("express");
const expressRouter = express();
expressRouter.use(express.json());
expressRouter.use(express.urlencoded({extended:true}));
expressRouter.use(express.static("public"));
const productRouter = require("./controllers/product");
const categoryRouter = require("./controllers/category");
const departmentRouter = require("./controllers/department");
const attributeRouter = require("./controllers/attribute");
const attributeValueRouter = require("./controllers/attributevalue");
const customersRouter = require("./controllers/customers");
const customerRouter = require("./controllers/customer");
const orderRouter = require("./controllers/order");
expressRouter.use("/products", productRouter);
expressRouter.use("/categories", categoryRouter);
expressRouter.use("/departments", departmentRouter);
expressRouter.use("/attributes", attributeRouter);
expressRouter.use("/attributevalues", attributeValueRouter);
expressRouter.use("/customers", customersRouter);
expressRouter.use("/customer", customerRouter);
expressRouter.use("/orders", orderRouter);
expressRouter.listen(3000);