Skip to content

carlbennettnz/json-api-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

json-api-example

An example API created with my JSON-API library (https://github.com/ethanresnick/json-api)

Try it out

  1. Clone the repo
  2. Run npm install
  3. Ensure MongoDB is running and listening on the default port
  4. Run node src/index.js
  5. Try out the following (for example):
  • GET http://localhost:3000/ to view the auto-generated documentation
  • GET http://localhost:3000/people to view the people collection
  • POST http://localhost:3000/schools to add a school
  • GET http://localhost:3000/organizations to view the organizations collection, which includes all schools too
  • GET http://localhost:3000/people/{id} to view a person, after it's been created
  • GET, POST, or PATCH http://localhost:3000/organizations/{id}/relationships/liaisons to view or modify an organization's liaisons relationship

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%