piei
v1.0.0
Published
just 4fun web framework
Downloads
3
Readme
piei.js
just 4fun web framework
usage example
const app = require('piei')
const PORT = 3000
app.route({
method: 'GET',
url: '/home',
handler: (req, res) => res.end('home2')
})
app.route({
method: 'POST',
url: '/home',
handler: (req, res) => {
console.log('body', req.body)
res.end('ok')
}
})
app.listen(PORT, 'localhost', () => {
console.log(`up ${PORT}`)
})