Skip to content

dtaskoff/todo-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todo-list

A simple RESTful application written during a Haskell workshop

Progress

Day 1

Day 2

Day 3

Setup

If you haven't already, install stack

Running

The following command starts the application on port 3000:

stack build && stack exec todo-list

Application

We'll manage tasks (in-memory) that have a title, a description and current status (todo and done).

REST API:

  • GET /task - return all tasks
  • GET /task/:id - return a task
  • POST /task - create a new task and return it
  • PUT /task/:id - update a task and return it
  • DELETE /task/:id - remove a task and return it

The returned tasks are in the following JSON format:

{
  "tid":0,
  "title":"Haskell Workshop",
  "description":"Run a Haskell Workshop",
  "status":"todo"
}

The same format (omitting tid) is used for POST and PUT methods, but the field status is optional when POSTing and all fields are optional when PUTting.


Currently, handlers for all methods mentioned above are implemented. They can be tested with sh test.sh (you'll need jq to run them)

Possible extensions:

  • place the tasks in different todo lists
  • add users

About

A simple RESTful application written during a Haskell workshop

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors