-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
26 lines (21 loc) · 906 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
// --------------------------EXPRESS JS-----------------------//
const express = require('express')
const app = express()
// ---------------------CONFIG GLOBALES cambios-----------------------//
const configs = require("./src/config.js/globals");
// --------------------------FACTORY--------------------------//
const Factory = require('./src/Factory.js/factory');
// --------------------------PUERTO--------------------------//
const DBSelected = process.argv[2] || "mongo"
console.log(DBSelected);
const DBS = Factory.getInstance(DBSelected);
DBS.connection(DBSelected);
// --------------------------RUTAS----------------------------//
const routes = require('./src/Routes/routes')
const Routes = new routes()
app.use(Routes.start())
// --------------------------PUERTO--------------------------//
const PORT = configs.PORT
app.listen(PORT, () => {
console.log(`Server working on port ${PORT}`)
})