Introduction | Getting started | How to test
I've challenged myself to make this programming exercise with an language that i'm a beginner, so this is written with Elixir/Phoenix.
First of all you need to clone this repository.
then you can open the project and search the file inside config/dev.exs
, here you can set up your database connection.
Here i'm using postgres as database, you need to have postgres in your machine or just use an docker image. Now you can follow the nexts steps.
-
Install dependencies with
mix deps.get
-
Create and migrate your database with
mix ecto.setup
-
Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.
Inside the root folder of the project you can see a file named ìnsomnia-guide.json
, you can use that to see the endpointds avaibles for the api.
In your bash you can use this command mix test
to see if the tests are up and running properly, i also added the capability to see the coverage of our tests.
You can use this command mix coveralls
to see in your bash or if you want something more visual you can use mix coveralls.html
, this command generate an html file inside the cover
folder, then open this file in your browser.