- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
//require("@babel/polyfill");
const Koa = require('koa')
const Router = require('koa-router')
const Koabody = require('koa-body')
const api = require('./api')
const app = new Koa()
const router = new Router()
const koabody = new Koabody({ multipart: false })
app.use(router.routes())
router.get('/', ctx => ctx.body = "hi")
app.listen(process.env.PORT || 3000)
//router.get('/api/paste', api.paste.getPaste )
//router.post('/api/save', koabody, api.paste.save)