This is the code companion to my Animation and Predictable Data Loading in Ember, presented at the Ember ATX Meetup on 3/28/2019.
You can run the app as is. Ember Mirage will create random data each time.
-
Do
npm install
. -
Run
ember s
, then visitlocalhost:4200
.
You can also run the app on a local Postgres server (you need this for step-1d).
- Set the environment variables
POSTGRES_USERNAME
andPOSTGRES_PASSWORD
.
export POSTGRES_USERNAME=<your username>
export POSTGRES_PASSWORD=<your password>
- In
/config/environment.js
, please edit theember-cli-mirage
option under development environment.
if (environment === 'development') {
ENV['ember-cli-mirage'] = {
enabled: false,
};
}
- In terminal, go to
/api
folder.
rake db:create db:migrate db:seed
This will create two databases, ember-animated-tutorial-development
and ember-animated-tutorial-test
. If you need to delete them, you can type rake db:drop
.
- Run
rails s
, then visitlocalhost:3000
.
You can check a starter code by running git checkout <branch name>
:
Branch name | Added features |
---|---|
step-1a | Starter for {{link-to}} bug |
step-1b | Starter for findRecord bug |
step-1c | Starter for findAll bug |
step-1d | Starter for (n + 1) query bug |
step-2a | Starter for animation with Web Animations API |
step-2b | Starter for animation with Ember Animated |
master | Completed |