splanky-api

jazz cats backend in phoenix/elixir

Stars
1

Cats

To start your Phoenix app:

  • Install dependencies with mix deps.get
  • psql -d postgres;
  • CREATE ROLE postgres LOGIN CREATEDB;
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Create and migrate your test database with MIX_ENV=test mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with npm install
  • mix test
  • Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

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

Heroku

Need to set pool size heroku run "POOL_SIZE=2 iex -S mix" -a jazz-cats-api

Adding Data

  • See /lib/event_inserter
  • iex -S mix
  • EventInserter.insert_events("https://www.smallslive.com/events/calendar/2017/12/")

Learn more

e = Cats.Repo.get(Cats.Event, 447)
import Ecto.Query, only: [from: 2]
as = Cats.Repo.all from a in Cats.Artist, where: a.id in [1116,1117,1118,1119]
Cats.Event.add_artists(e, as)