Skip to content

Commit 6ba0dff

Browse files
committed
Fix remove old way of creating server
1 parent 25f0bb2 commit 6ba0dff

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ server.low.db = {
4040
]
4141
}
4242

43-
server.get('/another/route', function(req, res, next) {
44-
// ...
45-
})
46-
4743
server.listen(3000);
4844
```
4945

@@ -64,9 +60,7 @@ You can find a running demo here: http://jsonplaceholder.typicode.com.
6460
$ npm install -g json-server
6561
```
6662

67-
## Usage
68-
69-
### Command line interface
63+
## CLI usage
7064

7165
```bash
7266

@@ -122,21 +116,6 @@ JSON Server expects JS files to export a ```run``` method that returns an object
122116

123117
Seed files are useful if you need to programmaticaly create a lot of data.
124118

125-
### Node module
126-
127-
#### run(db, [options])
128-
129-
```javascript
130-
var server = require('json-server'),
131-
db = require('./seed').run();
132-
133-
var options = { port: 4000, readOnly: true };
134-
135-
server.run(db, options);
136-
```
137-
138-
By default, ```port``` is set to 3000 and ```readOnly``` to false.
139-
140119
## Routes
141120

142121
```

0 commit comments

Comments
 (0)