Demonstrates the capabilities of REST api implemented using Jersey, Maven, mongodb, elasticsearch and twilio.
Please set following environment variables :
- TWILIO_ACCOUNT_SID
- TWILIO_AUTH_TOKEN
- TWILIO_TO
- TWILIO_FROM
- SEARCHBOX_URL
- MONGOHQ_URL
Example:
$ export MONGO_HOST=localhost
Clone the repository:
$ git clone git://github.com/smehta/todoapp.git
From the command line with Maven:
$ cd todoapp
$ mvn clean package
$ java -jar target/dependency/webapp-runner.jar target/*.war
REST URI for the following todo app use cases:
-
Get all todo items ( GET - http://localhost:8080/todo/items )
-
Get todo item by id ( GET - /todo/items/{id} )
-
Delete todo item ( DELETE - /todo/items/{id} )
-
Create todo item ( POST - /todo/items/)
-
Update item(title, body, done) ( PUT - /todo/items/{id} )
-
search for item ( GET - /todo/items?q=“cleaning” )
Sample JSON
{ "title" : "Cleaning house" "body" : "Laundry etc..", "done" : false }