Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

A simple TO-DO REST API project setup using Jersey 2 + Jackson 2 + MongoDB.

Notifications You must be signed in to change notification settings

xflin/jersey2-jackson-mongo-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jersey2-jackson-mongo-todo

A sample project setup using Jersey 2 + Jackson 2 + MongoDB, that implements a simple TO-DO note REST API.

  • GET /todo

    List To-Do items.

  • GET /todo?q=[query-text]

    Search "title" and "body" contents for matching TO-DO items.

  • POST /todo

    {"title": "...", "body": "...", done: false}

    Create a TO-DO item.

  • PUT /todo/[id]

    {...}

    (Full) Update of a TO-DO item.

  • PUT /todo/[id]/patch

    {...}

    Patch (partial update) of a TO-DO item.

  • PUT /todo/[id]/patch

    { "done": true }

    Mark done (when value is true) or undone (when value is false).

  • PUT /todo/[id]/patch

    { "done": true, ", smsPhoneNo: "6501234567" }

    Mark done and send SMS message.

  • DELETE /todo/[id]

    Delete a TO-DO item.

To Run in Local System

Heroku Env Variables

heroku config:set MONGODB_URL="..."
heroku config:set SEARCH_URL="https://site:{api-key}@{site}.searchly.com"

Optionally if you want to try SMS when "done" is marked:

heroku config:set TWILIO_ACCOUNT_SID="..."
heroku config:set TWILIO_AUTH_TOKEN="..."
heroku config:set TWILIO_FROM_PHONE_NO="+1##########"

About

A simple TO-DO REST API project setup using Jersey 2 + Jackson 2 + MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published