File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,6 @@ server.low.db = {
40
40
]
41
41
}
42
42
43
- server .get (' /another/route' , function (req , res , next ) {
44
- // ...
45
- })
46
-
47
43
server .listen (3000 );
48
44
```
49
45
@@ -64,9 +60,7 @@ You can find a running demo here: http://jsonplaceholder.typicode.com.
64
60
$ npm install -g json-server
65
61
```
66
62
67
- ## Usage
68
-
69
- ### Command line interface
63
+ ## CLI usage
70
64
71
65
``` bash
72
66
@@ -122,21 +116,6 @@ JSON Server expects JS files to export a ```run``` method that returns an object
122
116
123
117
Seed files are useful if you need to programmaticaly create a lot of data.
124
118
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
-
140
119
## Routes
141
120
142
121
```
You can’t perform that action at this time.
0 commit comments