Skip to content
Permalink
c33b19b8ca
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (13 sloc) 546 Bytes
#!/usr/bin/env node
const Koa = require('koa')
const Router = require('koa-router')
const app = new Koa()
const router = new Router()
const views = require('koa-views')
app.use(require('koa-static')('public'))
const port = 8080
app.use(views(`${__dirname}/views`, { extension: 'html' }, {map: { handlebars: 'handlebars' }}))
router.get('/', async ctx => await ctx.render('review'))
router.get('/cafe', async ctx => ctx.render('cafe'))
app.use(router.routes())
module.exports = app.listen(port, () => console.log(`listening on port ${port}`))