Heroku-Boilerplate

Bare bones files for a NodeJS app on Heroku

0
0
0
JavaScript
public
Forked

Submitter Name: Lee Mc Donald
Submitter Student ID: C07042060

Url code is deployed to: http://calendernodejs-lee.herokuapp.com/calendars

Documented example usage of your API:

Delete All - (to start with a simple repository)
curl -i -X DELETE http://calendernodejs-lee.herokuapp.com/calendars/deleteAll -H “content-Type: application/json”

Create New Calendar -
curl -i –X POST http://calendernodejs-lee.herokuapp.com/calendars/new --data ‘{“userName”:“lee”,“password”:“password”}’ -H “content-Type: application/json”

GET Calendars -
curl –I –X GET http://calendernodejs-lee.herokuapp.com/calendars/

GET Calendars by Id - (Id structure is dodgy)
curl –I –X GET http://calendernodejs-lee.herokuapp.com/calendars/1

GET Calendars by User -
curl –I –X GET http://calendernodejs-lee.herokuapp.com/calendars/lee/getByUser

GET Events Between start time end time - (not working)
GET /calendars/:id/getEvents/:startTime/:endTime

PUT Insert Event -
curl -i PUT http://calendernodejs-lee.herokuapp.com/calendars/2/newEvent --data ‘{“startTime”:“13-06-2014 08:00:00”,“endTime”:“15-12-2014 18:00:00”}’ -H “content-Type: application/json”

PUT Update Calendar -
curl -i -X PUT http://calendernodejs-lee.herokuapp.com/calendars/1/updateCalendar --data ‘{“userName”:“leeNew”,“password”:“newPassword”}’ -H “content-Type: application/json”

DELETE Delete Event -
curl -i -X DELETE http://calendernodejs-lee.herokuapp.com/calendars/1/deleteEvent/ --data -H “content-Type: application/json”

Delete Calendar -
curl -i -X DELETE http://calendernodejs-lee.herokuapp.com/calendars/1/delete --data -H “content-Type: application/json”

Dependancies - Packages in use
Express.js http://expressjs.com/
Jasmine-node.js https://github.com/mhevery/jasmine-node

Frisby.js http://frisbyjs.com/

To run these tests:
run: Jasmine-node spec/ at the root of the “spec/” folder.

v0.3.3[beta]