This is a challenge from Alura Backend Challenges where all the participants builed the backend of AluraFlix.
And is builded with:
- Elixir
- Phoenix
- Ecto
- Docker-Compose
Requirements:
- Elixir
- Erlang
- Docker
- Docker-compose
Clone the github repo to your local machine
With HTTPS:
https://github.com/jpbrab0/aluraflix-backend.gitWith SSH:
git clone git@github.com:jpbrab0/aluraflix-backend.gitWith Github CLI:
gh repo clone jpbrab0/aluraflix-backendTo start your Phoenix server:
- Install dependencies with
mix deps.get - Initialize the postgres with
docker-compose -f docker-compose.database.yml up -d - Create and migrate your database with
mix ecto.setup - Start Phoenix endpoint with
HOSTNAME=localhost mix phx.server
Now you can visit localhost:4000 from your browser.
docker-compose builddocker-compose run app mix ecto.setupdocker-compose upNow you can acess the project in localhost:8000 :)
To run all the test, execute in terminal:
the tests are under construction
mix testBase Url: https://localhost:4000/api
GET /videosGET /videos?search=GET /videos/:id| Parameter | Type |
|---|---|
id |
integer |
POST /videos| Parameter | Type |
|---|---|
title |
string |
category_id |
integer |
description |
string |
url |
string |
PUT /videos/:id| Parameter | Type |
|---|---|
id |
integer |
title |
string |
category_id |
integer |
description |
string |
url |
string |
DELETE /videos/:id| Parameter | Type |
|---|---|
id |
integer |
GET /categories/:id/videos| Parameter | Type |
|---|---|
id |
integer |
GET /categoriesGET /categories/:id| Parameter | Type |
|---|---|
id |
integer |
POST /categories| Parameter | Type |
|---|---|
title |
string |
color |
string |
PUT /categories/:id| Parameter | Type |
|---|---|
id |
integer |
title |
string |
color |
string |
DELETE /categories/:id| Parameter | Type |
|---|---|
id |
integer |
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix
The project has made by João Pedro Resende