- Exposes one
GET
route- GET
/api/users
returns200 OK
result of["Mary", "John", "Jill"]
- GET
- Includes e2e test to check that the endpoint responds correctly
- Uses four dependencies
- See with_env_config
branch which adds a
make config
task for creating.env
from a.env_sample
. - See with_new_relic_agent branch for an example of new relic monitoring.
- See with_new_relic_agent_and_env_config branch for an example that combines the two individual branches together.
- Uses a
.lab
folder, aMakefile
, and aJustfile
.lab
contains allmix new
generated files / folders- Uses symlinks to / from
.lab
to simplify organization - Has a
Makefile
andJustfile
to manage project commands
- Allows important folders / files to stay in the primary project dir
.lab
folder is short forlaboratory
(where wemix
ourelixir
:D)src
folder is linked to thelib
folder in.lab
conf
folder contains both the:mix.exs
from the root of.lab
folderconfig.exs
from theconfig
dir of.lab
folder
test
folder is linked to thetest
folder in.lab
- This project uses
Make
orJust
to simplifymix
andiex
commands - If using
just
, replace all commands starting withmake
tojust
- Having either one on your machine will work and setup is easy
- OSX / Linux
- By default you should already have
make
on your machine - If you want to install
just
you can get it here - On OSX you can run
brew install just
- By default you should already have
- Windows
- Make doesn't come by default
- If you want to install
just
you can get it here
- OSX / Linux
make deps
- See code in
conf/mix.exs
- See code in
make build
- See code in
conf/*.exs
- See code in
- Start the server
make run
- See code in
src/*.ex
- How to test either manually or automatically
- After running
make run
you can either:- Use CURL
curl -v "http://127.0.0.1:8085/api/users"
- Use Browser
open http://127.0.0.1:8085/api/users
- Use CURL
- ExUnit
make test
- Runs project and asserts correct response is returned
- See code in
test/http_app_test.ex