server.js 534 Bytes
const express = require('express');
const app = express();
const port = 5000;
const test = require('./router/test');
const weather = require('./router/Weather');
const location = require('./router/location');
const bodyParser = require('body-parser');
const cors = require('cors');

app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(cors());
app.use("/api", test);
app.use("/weather", weather);
app.use("/locate", location);



app.listen(port, ()=> console.log('Server is running on :', port));