Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinstarman/json-api
Create API from JSON files with one command
https://github.com/martinstarman/json-api
api micro microservice
Last synced: about 2 months ago
JSON representation
Create API from JSON files with one command
- Host: GitHub
- URL: https://github.com/martinstarman/json-api
- Owner: martinstarman
- License: mit
- Created: 2017-04-27T20:20:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T10:53:19.000Z (almost 2 years ago)
- Last Synced: 2023-05-05T21:33:10.132Z (over 1 year ago)
- Topics: api, micro, microservice
- Language: JavaScript
- Size: 85.9 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# json-api
Create read only API from your data with one command.
## Usage
- Add your data in json files to ```data``` dir.
- File name equals resource name, e.g. ```users.json``` equals ```/users```
- Run ```npm start```.
- Go to ```localhost:3000/```### Filtering
You can filter data passing properties as parameters. E.g. ```example.json``` with
```
[{
a:1,
b:2,
c:3
}, {
a:4,
b:5,
c:6
}]
```Request ```http://localhost:3000/example?a=4``` returns
```
[{
a:4,
b:5,
c:6
}]
```### Run server
```npm start```
### Run tests
```npm test```