File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed
Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,30 @@ It might be useful for small projects (e.g. hackathon).
1414
1515## Installation
1616
17- ` npm install rest-flat-file-db --save `
18-
1917## Usage
2018
2119### As standalone instance
2220
2321```
24- $ PORT=3333 DB=/tmp/mydatabase npm start
25- ```
22+ # install the module globally
23+ $ npm install -g rest-flat-file-db
2624
27- will start a ` rest-flat-file-db ` instance on ` http://localhost:3333 ` and the values will be stored in ` /tmp/mydatabase ` file
25+ # start the module with default parameters
26+ $ rest-flat
27+
28+ # OR start it with custom parameters
29+ $ PORT=3333 DB=/tmp/mydatabase rest-flat
30+ ```
2831
2932### As module
3033
34+ ` $ npm install rest-flat-file-db --save `
35+
36+
3137``` javascript
38+
39+ // index.js
40+
3241const restflat = require (' rest-flat-file-db' );
3342const flatdb = require (' flat-file-db' );
3443
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env node
2+ require ( './start' ) ;
Original file line number Diff line number Diff line change 33 "version" : " 1.1.0" ,
44 "description" : " REST API for flat-file-db" ,
55 "main" : " index.js" ,
6+ "bin" : {
7+ "rest-flat" : " ./bin.js"
8+ },
69 "author" : " balazs4 <balazs4web@gmail.com>" ,
710 "license" : " MIT" ,
811 "scripts" : {
9- "start" : " node start.js" ,
10- "start:verbose" : " DEBUG=rest-flat node start.js" ,
12+ "start" : " DEBUG=rest-flat node start.js" ,
1113 "test" : " jest --coverage"
1214 },
1315 "dependencies" : {
You can’t perform that action at this time.
0 commit comments