Skip to content

daphnecarvalho/ignite-elixir-CRUD-refeicoes-diarias

Repository files navigation

ExMeal - Challenge: CRUD - Daily meals

codecov

Instructions: CRUD - Refeições diárias, Testando a aplicação and Desafio Final.

Base URL

http://localhost:4000/

Gigalixir URL

https://married-boiling-unicorn.gigalixirapp.com/

Routes

/api/meals

  • [GET] /
    • ExmealWeb.MealsController :index
  • [GET] /:id
    • ExmealWeb.MealsController :show
  • [POST] /
    • ExmealWeb.MealsController :create
  • [PATCH] /:id
    • ExmealWeb.MealsController :update
  • [PUT] /:id
    • ExmealWeb.MealsController :update
  • [DELETE] /:id
    • ExmealWeb.MealsController :delete

Tests

Tests: 24 total

Project commands

Prepare project

  # Intall dependencies
  mix deps.get

  # Start PostgreSQL service
  service postgresql start

  # Reset migrations
  mix ecto.reset
  MIX_ENV=test mix ecto.reset 

  # View app routes
  mix phx.routes

Run project

  # Start Phoenix server
  mix phx.server

Run tests

  # Intall dependencies
  mix test

  # Check coverage of tests
  mix test --cover