-
Notifications
You must be signed in to change notification settings - Fork 1
README DRAFT
Francesca Sadikin edited this page Sep 24, 2019
·
6 revisions
To start your Phoenix server:
- Install dependencies with
mix deps.get - Create and migrate your database with
mix ecto.setup - Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000 from your browser.
Ready to run in production? Please check our deployment guides.
mix ecto.drop --repo FocalApi.Repo
mix ecto.create
mix ecto.migrate
mix run priv/repo/seeds.exs
mix ecto.rollback
mix ecto.migrate
mix run priv/repo/seeds.exs
dropdb focal_api_test
mix ecto.migrate
git push heroku <branch_name>:master
heroku pg:info // get db_name from add-on field.
heroku pg:reset DB_NAME
heroku run MIX_ENV=prod mix ecto.migrate
heroku run MIX_ENV=prod mix run priv/repo/seeds.exs
heroku restart
- Create a .env file in your root and add the following
export GOOGLE_CLIENT_ID="Get from Teammate"
export GOOGLE_CLIENT_SECRET="Get from Teammate"
export CLIENT_HOST=http://localhost:<client_port>
source .envmix phx.server
source .envmix test
- Update schema and create new migration record
- Update any views related to the schema
- Drop Test database
- Run migration
- Run all tests
Migrations, when run, cannot be updated. If you need to make any updates to the migration changes you just made, you will need to either delete the migration file and create a new one with all correct chanegs. Or, create a new migration file specifying the changes you missed.