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
- Host: GitHub
- URL: https://github.com/kenberkeley/tiny-express
- Owner: kenberkeley
- Created: 2016-12-18T15:51:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-23T10:36:22.000Z (over 9 years ago)
- Last Synced: 2026-04-08T04:34:52.039Z (3 months ago)
- Topics: browser, express
- Language: JavaScript
- Size: 14.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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