Skip to content

martinstarman/json-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/<your-api-endpoint>

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

About

Create API from JSON files with one command

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages