-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
41 lines (35 loc) · 1.25 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
36
37
38
39
40
41
var express = require("express");
var path = require("path");
var cookieParser = require("cookie-parser");
var bodyParser = require("body-parser");
var dotenv = require("dotenv");
var cors = require("cors");
dotenv.config();
var departments = require("./routes/departments");
var categories = require("./routes/categories");
var attributes = require("./routes/attributes");
var products = require("./routes/products");
var customers = require("./routes/customers");
var updateCustomer = require("./routes/update_customer");
var orders = require("./routes/orders");
var shoppingcart = require("./routes/shoppingcart");
var tax = require("./routes/tax");
var shipping = require("./routes/shipping");
var stripe = require("./routes/stripe");
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(cors());
app.use("/departments", departments);
app.use("/categories", categories);
app.use("/attributes", attributes);
app.use("/products", products);
app.use("/customers", customers);
app.use("/customer", updateCustomer);
app.use("/orders", orders);
app.use("/shoppingcart", shoppingcart);
app.use("/tax", tax);
app.use("/shipping", shipping);
app.use("/stripe", stripe);
module.exports = app;