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 = {
4040 ]
4141}
4242
43- server .get (' /another/route' , function (req , res , next ) {
44- // ...
45- })
46-
4743server .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
123117Seed 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```
You can’t perform that action at this time.
0 commit comments