zuper-json-bodyparser

0.3.1 • Public • Published

json-bodyparser

JSON body parser for zuper

Usage

import { Server } from 'http'
import { Application } from 'zuper'
import json from 'zuper-json-bodyparser'
 
const server = new Server()
const app = new Application()
 
const getBody = req => req.body
 
app.use(json)
app.use(getBody)
 
server.on('request', app.handleRequest)
server.listen(80, '127.0.0.1', () => {
  console.log('Server running at http://localhost/')
})

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i zuper-json-bodyparser

    Weekly Downloads

    0

    Version

    0.3.1

    License

    MIT

    Last publish

    Collaborators

    • nicolasparada