An open API service indexing awesome lists of open source software.

https://github.com/kenberkeley/tiny-express

Implement a tiny express which can run in browser
https://github.com/kenberkeley/tiny-express

browser express

Last synced: about 2 months ago
JSON representation

Implement a tiny express which can run in browser

Awesome Lists containing this project

README

          

# Tiny Express

[![npm version][npm-v-img]][npm-url]
[![npm download][npm-dl-img]][npm-url]
[![build][build-img]][build-url]
[![coverage][cov-img]][cov-url]

> Implement a tiny express which can run in browser

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

```
app.use()
app.VERB(, , )

app
.receive({ method: , url: , body: })
.respond(function(result) {
// deal with result
})
```

```
req: {
method: ,
originalUrl: ,
path: ,
query: ,
params: ,
body:
}

res: {
send: ,
json:
}
```

[npm-url]: https://www.npmjs.com/package/tiny-express
[npm-v-img]: http://img.shields.io/npm/v/tiny-express.svg
[npm-dl-img]: http://img.shields.io/npm/dm/tiny-express.svg
[build-img]: https://travis-ci.org/kenberkeley/tiny-express.svg?branch=master
[build-url]: https://travis-ci.org/kenberkeley/tiny-express
[cov-img]: https://coveralls.io/repos/github/kenberkeley/tiny-express/badge.svg
[cov-url]: https://coveralls.io/github/kenberkeley/tiny-express