An example API created with my JSON-API library (http://github.com/ethanresnick/json-api)
- Clone the repo
- Run
npm install
- Ensure MongoDB is running and listening on the default port
- Run
node src/index.js
- Try out the following (for example):
GET http://localhost:3000/
to view the auto-generated documentationGET http://localhost:3000/people
to view the people collectionPOST http://localhost:3000/schools
to add a schoolGET http://localhost:3000/organizations
to view the organizations collection, which includes all schools tooGET http://localhost:3000/people/{id}
to view a person, after it's been createdGET
,POST
, orPATCH
http://localhost:3000/organizations/{id}/relationships/liaisons
to view or modify an organization'sliaisons
relationship