2021-10-09 00:12:56 +00:00
|
|
|
import { Flaska } from './flaska.mjs'
|
|
|
|
|
|
|
|
const port = 51024
|
|
|
|
const flaska = new Flaska({}, )
|
|
|
|
|
|
|
|
flaska.get('/', function(ctx) {
|
2022-01-05 14:06:06 +00:00
|
|
|
ctx.body = { status: true }
|
2021-10-09 00:12:56 +00:00
|
|
|
})
|
|
|
|
|
2022-01-05 14:06:06 +00:00
|
|
|
flaska.get('/error', function(ctx) {
|
|
|
|
process.exit(1)
|
2021-10-11 02:06:22 +00:00
|
|
|
})
|
|
|
|
|
2021-10-09 00:12:56 +00:00
|
|
|
flaska.listen(port, function() {
|
|
|
|
console.log('listening on port', port)
|
|
|
|
})
|