Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 430 Bytes

api.md

File metadata and controls

20 lines (12 loc) · 430 Bytes

class Router

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

constructor(options)

It is the same with express.Router

METHOD(path, handler)

  • path / string. Correspond request path.
  • handler / function(req, res). Handler function.

METHOD can be one of get, post, put, patch, delete.

get express()

Return express.Router router.