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/peopleto view the people collectionPOST http://localhost:3000/schoolsto add a schoolGET http://localhost:3000/organizationsto view the organizations collection, which includes all schools tooGET http://localhost:3000/people/{id}to view a person, after it's been createdGET,POST, orPATCHhttp://localhost:3000/organizations/{id}/relationships/liaisonsto view or modify an organization'sliaisonsrelationship