-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (22 loc) · 801 Bytes
/
Copy pathindex.js
File metadata and controls
28 lines (22 loc) · 801 Bytes
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
const { connection } = require('./db/conexion');
const express = require("express");
const cors = require("cors");
connection();
const app = express();
const port = 4800;
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cors());
const product_routes = require("./routes/product_routes");
const user_routes = require("./routes/user_routes");
const banner_routes = require('./routes/banner_routes');
const article_routes = require("./routes/article_routes");
const group_routes = require("./routes/group_routes");
app.use("/api", product_routes);
app.use("/auth", user_routes);
app.use("/api", banner_routes);
app.use("/api", article_routes);
app.use("/api", group_routes);
app.listen(port, () => {
console.log(`servidor funcionando en el puerto ${port}`);
});