To-do app built on Crystal

Spider-Gazelle To-do App

Build Status



Method Path Controller Actions
get /todos TasksController#index
get /todos/:id TasksController#show
post /todos TasksController#create
patch /todos/:id TasksController#update
delete /todos/:id TasksController#destroy

Task Resource

  • Attributes
    • Title : String
    • Order : Int32
    • Completed : Bool

Create a task

  • Send the Task object to TasksController#create { title: 'Going shopping' }

View a task

  • Set params ID to task ID /:id/ and send to TasksController#show

Update a task

  • Set params ID to task ID. Send single or multiple attributes of the Task object to TasksController#update { title: 'Going shopping in Parramatta, completed: true, order: 5' }

View all tasks

  • Send a request to TasksController#index

Delete a task

  • Set params ID to task ID /:id/ and send to TasksController#destroy

Running in Local Environment

With Docker

  • Test Environment: ENV_VAR=test docker-compose up --build --exit-code-from web

  • Production Environment: ENV_VAR=prod docker-compose up --build

Without Docker

  • to run in development mode crystal ./src/spidergazelletodo.cr

  • to run in watch mode

    • install node.js
    • install nodemon npm i -g nodemon
    • execute the following command nodemon --exec crystal ./src/spidergazelletodo.cr


  • to run all tests crystal spec
  • to watch all tests during edits nodemon --exec crystal spec


crystal build ./src/spidergazelletodo.cr


Once compiled you are left with a binary ./spidergazelletodo

  • for help ./spidergazelletodo --help
  • viewing routes ./spidergazelletodo --routes
  • run on a different port or host ./spidergazelletodo -b -p 80
github statistic
  • 0
  • 0
  • 0
  • 0
  • 8 months ago
  • August 10, 2020

MIT License

Synced at

Fri, 14 May 2021 03:51:50 GMT