e3a0289ea2
* fix: remove user stories * fix: remove assets + add sample.env, dotenv, gitignore * fix: update package-lock * fix: add dotenv + update package-lock * feat: remove error handling * fix: remove mlab env var * fix: remove bashrc * remove express body parser + organize code * fix: remove gitconfig
19 lines
389 B
JavaScript
19 lines
389 B
JavaScript
const express = require('express')
|
|
const app = express()
|
|
const cors = require('cors')
|
|
require('dotenv').config()
|
|
|
|
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)
|
|
})
|