node

mail@pastecode.io avatar
unknown
javascript
a year ago
448 B
2
Indexable
Never
const express = require('express');
const router = require('./rutas');
const morgan = require('morgan');
const cors = require('cors');

const app=express();


app.use(require('express-useragent').express())

app.use(morgan('dev'));
app.use(cors({
    origin: '*'
}));
app.use(express.json());
app.use(express.urlencoded({extended:true}));
const port = 3000;
app.set('port',port);
app.use("/api",router);

module.exports = app;