Skip to content
Permalink
c073d0f5f0
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
27 lines (21 sloc) 578 Bytes
'use strict'
require('dotenv').config()
const Koa = require('koa')
const views = require('koa-views')
const Router = require('./core/routes')
const app = new Koa()
const port = process.env.SERVER_PORT
app.use(views(`${__dirname}/core/views`,
{
extension: 'hbs',
options: {
partials: {
header: `${__dirname}/core/views/partials/header`,
footer: `${__dirname}/core/views/partials/footer`
}
},
map: { hbs: 'handlebars' }
}))
app.use(Router.routes())
app.use(Router.allowedMethods())
app.listen(port, () => console.log(`Server running on ${port}...`))