- Demonstrate how an Ember app works when using FastBoot, including the capabilities of several
packages:
ember-simple-auth
, used to authenticate the user with the backend using OAuth2 Implicit Flowember-cached-shoe
, used to cache the data fetched by FastBoot on the rendered response.ember-cable
, used to receive posts in real time.
The easiest way to kick this demo, is to use Docker - You'll need to have Docker and Docker Compose
installed. Having plis
installed is recommended to reduce
typing:
# Start the project using docker-compose:
docker-compose up backend_web frontend_web
# Alternatively, use plis:
plis start demo
The frontend may be a little slow if your'e using Docker for Mac/Windows. You can alternatively
start the ember app without docker - I recommend using nvm
.
You'll need to have yarn
and ember-cli
installed globally:
# Change dir into the frontend ember app:
cd frontend
# Install dependencies and start ember:
yarn install && ember serve
-
Notice how we use
socat
to tunnel the backend_web service to the frontend containers' port 3000. This is used only for development with Docker purposes, as the frontend containers see the backend service through a different hostname than the client (backend_web
vslocalhost
). -
If trying to run the frontend locally after running it previously with Docker, you might need to remove the
frontend/dist
andfrontend/node_modules
before runningember serve
, specially if using Docker for Mac/Windows.