jeevan
Simple web framework
Last updated 3 days ago by twharmon .
ISC · Original npm · Tarball · package.json
$ cnpm install jeevan 
SYNC missed versions from official npm registry.

Jeevan

Simple web framework.

Usage

import { Context, Engine, JSONResponse } from 'jeevan'

const app = new Engine()

app.get('/hello/{name}', async (ctx: Context) => {
    return new JSONResponse({ hello: ctx.params.name })
})

app.post('/hello', async (ctx: Context) => {
    const body = await ctx.body()
    return new JSONResponse(body)
})

app.ws('/ws').on('connection', ws => {
    ws.on('message', msg => {
        ws.send(msg)
    })
})

app.serve(8000)

Contribute

Make a pull request.

Current Tags

  • 0.1.3                                ...           latest (3 days ago)

8 Versions

  • 0.1.3                                ...           3 days ago
  • 0.1.2                                ...           3 days ago
  • 0.1.1                                ...           2 months ago
  • 0.1.0                                ...           2 months ago
  • 0.0.3                                ...           2 months ago
  • 0.0.2                                ...           2 months ago
  • 0.0.1                                ...           2 months ago
  • 0.0.0                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 36
Last Day 8
Last Week 36
Last Month 6
Dependencies (1)
  • ws ^7.2.1
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |