Skip to content

Instantly share code, notes, and snippets.

@wyozi
Created June 2, 2020 13:27
Show Gist options
  • Save wyozi/bdba9a19d8373029cca35f04e6ee954c to your computer and use it in GitHub Desktop.
Save wyozi/bdba9a19d8373029cca35f04e6ee954c to your computer and use it in GitHub Desktop.
Phoenix Framework must-haves
# Run REPL
iex -S mix
# Start server AND open REPL
iex -S mix phx.server
# Script for decimating everything in the database. You can run it as:
#
# mix run priv/repo/truncate_all.exs
unless Mix.env() == :dev, do: System.halt(1)
Inuative.Repo.query("TRUNCATE my_table_name CASCADE", [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment