Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit e55f774

Browse files
committed
Add forgotten files
1 parent fe00221 commit e55f774

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
!dist
2+
lib
3+
examples
4+
docs
5+
.github
6+
.nyc_output
7+
coverage
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# createrest-express
2+
3+
[![Travis](https://img.shields.io/travis/atomixinteractions/createrest-express.svg)](https://travis-ci.org/atomixinteractions/createrest-express)
4+
[![Coverage Status](https://coveralls.io/repos/github/atomixinteractions/createrest-express/badge.svg?branch=master)](https://coveralls.io/github/atomixinteractions/createrest-express?branch=master)
5+
[![npm](https://img.shields.io/npm/v/createrest-express.svg)](https://npmjs.com/createrest-express)
6+
[![GitHub tag](https://img.shields.io/github/tag/atomixinteractions/createrest-express.svg)](https://github.com/atomixinteractions/createrest-express)
7+
[![license](https://img.shields.io/github/license/atomixinteractions/createrest-express.svg)](https://github.com/atomixinteractions/createrest-express)
8+
9+
10+
## Readme
11+
12+
Express middleware for [createrest](https://github.com/atomixinteractions/createrest)
13+
14+
## Usage example
15+
16+
```js
17+
const { createRest, printRoutes } = require('createrest')
18+
const { createExpressMiddleware } = require('createrest-express')
19+
const express = require('express')
20+
21+
const app = express()
22+
23+
const routes = createRest(e => {
24+
// Your routes here
25+
})
26+
27+
app.use(createExpressMiddlware(routes))
28+
29+
app.listen(3000, () => {
30+
printRoutes(routes)
31+
console.log('Listening port 3000...')
32+
})
33+
```

0 commit comments

Comments
 (0)