2017-02-18 20:06:54 +01:00
|
|
|
const express = require('express')
|
|
|
|
const app = express()
|
|
|
|
const cors = require('cors')
|
2020-11-26 16:58:01 +01:00
|
|
|
require('dotenv').config()
|
2017-02-18 20:06:54 +01:00
|
|
|
|
|
|
|
app.use(cors())
|
|
|
|
app.use(express.static('public'))
|
|
|
|
app.get('/', (req, res) => {
|
|
|
|
res.sendFile(__dirname + '/views/index.html')
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const listener = app.listen(process.env.PORT || 3000, () => {
|
|
|
|
console.log('Your app is listening on port ' + listener.address().port)
|
|
|
|
})
|