A sample app running hapi on heroku
Before cloning this repository and reploying to heroku install the Heroku Toolbelt.
git clone git://github.com/wpreul/hapi-heroku.git && cd hapi-heroku
heroku login
heroku create
git push heroku master
heroku ps:scale web=1
heroku open
Here are all the route this basic server provides
GET /(?username=string)
: return Success!, and accept an eventPOST /
: echo the POST body back to youGET /admin?username=string&password=string
: return Success!GET /users?email=email
: return Success!GET /config?choices=array
: return Success!GET /test(?positiveNumber)
: return Success!GET /output(?input=string)
: return {"myOutput":"$input"}GET /users/{id}?name=string
: return Success!POST /users/{id}
: expect a json body of {title:string,status:(open|pending|close), participants:[array of at least 2 string or number]. return succesGET /redirect
: redirect to /errorGET /error
: return This is my error