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: 12 days 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T10:53:19.000Z (over 2 years ago)
- Last Synced: 2025-04-14T09:42:39.308Z (3 months ago)
- Topics: api, micro, microservice
- Language: JavaScript
- Size: 85.9 KB
- Stars: 8
- Watchers: 2
- 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```