/elixir_cool_libs_talk

Some cool libs in elixir for the BeamBA meetup

Primary LanguageElixirGNU General Public License v3.0GPL-3.0

elixir cool libs talk for BeamBA meetup

This is a basic Phoenix Species App 🐦 🌿 done with ❤️

How to follow the talk:

  1. git clone git@github.com:pbrudnick/elixir_cool_libs_talk.git or just fork it!
  2. git checkout <BRANCH_NAME> for the desired topic of the talk
  3. Read the README.md of each branch to know the additions and more details.
  4. Run it!

Branch logic

In the different branches I will be adding some cool libs to my app. Each branch will be incremental from the previous one in order to adding functionality to the app.

  • base - the base Phoenix with species endpoints
  • guardian - adds Guardian and Comeonin/Bcrypt for user/session
  • cachex - adds Cachex for caching API responses
  • external_service - adds ExternalService for circuit breaker and rate limiter on API requests for specie observations
  • logster - adds Logster plug for HTTP logs
  • master - always the last version (logster branch for now)

Run it!

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Start Phoenix endpoint with EBIRD_API_TOKEN=<YOUR_EBIRD_TOKEN> mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

HTML admin

Creating a user:

http://localhost:4000/admin/users/new

Species admin

http://localhost:4000/admin/species

API REST Endpoints

GET /api/species

http://localhost:4000/api/species

GET /api/species/:id

http://localhost:4000/api/species/:id

GET /api/species/:id/observations

http://localhost:4000/api/species/:id/observations

Learn more