Skip to content

Instantly share code, notes, and snippets.

@oskarrough
Last active May 6, 2019 04:24
Show Gist options
  • Save oskarrough/42cef880cbfa874637e90c08102f18d0 to your computer and use it in GitHub Desktop.
Save oskarrough/42cef880cbfa874637e90c08102f18d0 to your computer and use it in GitHub Desktop.

Here's how you can get server-side rendering with Ember + FastBoot and deploy it with now.sh.

It requires an ember-cli application that doesn't fail when you run ember fastboot --serve-assets. Also that you have now.sh installed.

How to deploy ember with fastboot using now.sh

  1. ember install ember-cli-fastboot
  2. Add a server.js (example)
  3. ember build -p
  4. cp server.js dist/server.js
  5. Add a start script to dist/package.json (example)
  6. cd dist; npm i --save fastboot-app-server; cd ..
  7. now dist

So, of course this should be automated. Especially steps 5. and 6. Be my guest! But it works for now.

How to deploy ember (without fastboot) using now.sh

  1. Add "deploy": "ember build --environment=production; now dist" to your npm scripts in package.json
  2. npm run deploy

This is easier, since we are building the project locally instead of letting now do it.

@jmonster
Copy link

jmonster commented May 6, 2019

@oskarrough thanks for this write up! but unfortunately #5 references a dead link if you'd like to update the gist :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment