Skip to content

kevin-leptons/trop_async_router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async_router

Asynchronous Router for Express - Make async/await handlers simple.

Features

  • Wrap handlers, allow async/await calling.

Usage

const Router = require('@trop/async_router')
const express = require('express')

let router = new Router()

router.
get('/', async(req, res) => {
    let items = await service.fetch()
    res.json(items)
})

let app = express()

app.use('/api', router.express)
app.listen(8080)
  • service.fetch(), an async operation.
  • router.express, retrieve express router.

Documents

About

Async router for express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published