1.0.0 • Published 7 years ago

piei v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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}`)
})