How to deploy an Ember app with Netlify

Once you have your Ember application all set up with all the styling, it's time to deploy. You can do this via Netlify, but before that, you have to make it ready for production. You can do that by following these steps:

1. Make the app ready for deployment

To do this, you'll want to run the command: ember build --environment=production. This build command will bundle up all of the code that makes your application: JavaScript, CSS, images, fonts, and everything else.

The --environment flag will then create an optimized package that you can upload to a web host like Netlify. Once this command runs, you will find all the minified files in your app's dist/ folder.

2. Show the web server how to handle URLs

Next, you will want to tell Netlify how to handle your application's URLs. You can do this in two ways:

  • Create a file in your public folder called _redirects. You'll then add /* /index.html 200 to the first line of this file and save it. This will tell the server to redirect all pages to index.html.

  • Use an Ember add-on by installing ember-cli-netlify and use that to handle your URLs.

Once you have this setup, you can then go into Netlify, click on your preferred Git provider, choose the source code, and deploy.

Hope that's helpful! Thank you for reading. :)