16 lines
293 B
JavaScript
16 lines
293 B
JavaScript
import { Flaska } from './flaska.mjs'
|
|
|
|
const port = 51024
|
|
const flaska = new Flaska({}, )
|
|
|
|
flaska.get('/', function(ctx) {
|
|
ctx.body = { status: true }
|
|
})
|
|
|
|
flaska.get('/error', function(ctx) {
|
|
process.exit(1)
|
|
})
|
|
|
|
flaska.listen(port, function() {
|
|
console.log('listening on port', port)
|
|
})
|