0.1.17 • Published 4 years ago

jeevan v0.1.17

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

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: { message: string } = 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.

0.1.16

4 years ago

0.1.17

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago