1 | var merry = require('./')
|
2 |
|
3 | var app = merry()
|
4 |
|
5 | app.route('GET', '/', function (req, res, ctx) {
|
6 | ctx.log.info('oh hey, a request here')
|
7 | ctx.send(200, { cute: 'butts' })
|
8 | })
|
9 |
|
10 | app.route('default', function (req, res, ctx) {
|
11 | ctx.log.info('Route doesnt exist')
|
12 | ctx.send(404, { message: 'nada butts here' })
|
13 | })
|
14 |
|
15 | app.listen(8080)
|