Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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```