- Exposes one
GETroute- GET
/api/usersreturns200 OKresult 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 configtask for creating.envfrom 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
.labfolder, aMakefile, and aJustfile.labcontains allmix newgenerated files / folders- Uses symlinks to / from
.labto simplify organization - Has a
MakefileandJustfileto manage project commands
- Allows important folders / files to stay in the primary project dir
.labfolder is short forlaboratory(where wemixourelixir:D)srcfolder is linked to thelibfolder in.labconffolder contains both the:mix.exsfrom the root of.labfolderconfig.exsfrom theconfigdir of.labfolder
testfolder is linked to thetestfolder in.lab
- This project uses
MakeorJustto simplifymixandiexcommands - If using
just, replace all commands starting withmaketojust
- Having either one on your machine will work and setup is easy
- OSX / Linux
- By default you should already have
makeon your machine - If you want to install
justyou 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
justyou 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 runyou 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