flaska/test.mjs

18 lines
362 B
JavaScript
Raw Normal View History

2021-10-09 00:12:56 +00:00
import { Flaska } from './flaska.mjs'
const port = 51024
const flaska = new Flaska({}, )
flaska.get('/', function(ctx) {
return new Promise(function(res, rej) {
ctx.body = { status: true }
setTimeout(res, 1000)
}).then(function() {
process.stdout.write(".")
})
})
flaska.listen(port, function() {
console.log('listening on port', port)
})