-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
28 lines (23 loc) · 858 Bytes
/
app.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
27
28
'use strict'
const express = require('express')
const cors = require('cors')
const app = express()
const builtUpAreas = require('./routes/builtUpAreas')
const libraryAuthorities = require('./routes/libraryAuthorities')
const lsoas = require('./routes/lsoas')
const placeNames = require('./routes/placeNames')
const postcodes = require('./routes/postcodes')
const routing = require('./routes/routing')
require('dotenv').config()
app.use(express.json())
app.use(express.urlencoded({ extended: false }))
app.use(cors())
app.use('/rest/builtupareas', builtUpAreas)
app.use('/rest/libraryauthorities', libraryAuthorities)
app.use('/rest/lsoas', lsoas)
app.use('/rest/placenames', placeNames)
app.use('/rest/postcodes', postcodes)
app.use('/rest/routing', routing)
const port = process.env.PORT || 8080
const server = app.listen(port)
server.timeout = 240000