PUBLICREADY
index.js
'use strict'
const express = require('express')
const path = require('path')
const router = require('./router')
const middleware = require('./utils/middleware')
const app = express()
const port = process.env.PORT || 8000
app.use(middleware.errorHandler) // must come before using the router
app.use(router)
app.use(express.static('public'))
app.set('view engine', 'pug')
app.set('views', path.join(__dirname, 'public'))
app.listen(port, () => {
  console.log(`We are live on http://localhost:${port}`)
})
app.get('/keybase.txt', (req, res) => {
  console.log('Getting keybase.txt')
  res.sendFile(`${__dirname}/keybase.txt`)
})