Skip to content

daphnecarvalho/ignite-elixir-relacionamento-entidades

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExMeal - Challenge: Entity relationship

Instructions: Relacionamento de entidades.

Base URL

http://localhost:4000/

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

/api/users

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

Tests

Tests: 40 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