const express = require("express");
const router = require("./routers");
const cors = require("cors");
const bodyParser = require("body-parser");

const port = process.env.PORT || 9000;
const app = express();

app.use(cors());
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));
app.use("/api/auth", router.auth);
app.use("/api/list", router.list);
app.use("/api/shop", router.shop);
app.use("/api/promotion", router.promotion);
app.use("/api/review", router.review);
app.use("/api/booking", router.booking);
app.use("/api/storage", router.storage);
app.use("/api/storageprofile", router.storageprofile);
app.use("/api/storageshop", router.storageshop);
app.use("/api/storagebeautician", router.storagebeautician)
app.use("/api/beautician", router.Beautician)
app.listen(port, () => {
  console.log("Express server listening on port " + port);
});
