Skip to content

kenberkeley/tiny-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Express

npm version npm download build coverage

Implement a tiny express which can run in browser

Methods supported: GET / POST / PUT / DELETE / PATCH / OPTIONS

app.use(<middleware>)
app.VERB(<path>, <middlewares?>, <handler>)

app
  .receive({ method: <String>, url: <String>, body: <Any> })
  .respond(function(result) {
    // deal with result
  })
req: {
  method: <String>,
  originalUrl: <String>,
  path: <String>,
  query: <Object>,
  params: <Object>,
  body: <Object>
}

res: {
  send: <Function>,
  json: <Function>
}

About

Implement a tiny express which can run in browser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published