ionic Heroku Deploy
Recently I worked on IonicApp and thought it must be possible to run it over Heroku and that works.
- Heroku-Toolbet √
- Ionic √
- node √
Additional, a app.json is needed for some meta information about your app.
The last thing we need is the file which will be executed by Heroku. Heroku will look for a server.js, so create this file as well on the top level of your ionic project and insert:
Now you can test your app local. Instead of
ionic serve, we will install the modules and run it with our express server,
so go ahead:
If you receive no error, you can access your app on
http://localhost:5000/. If you have problems, fix that at your local
Once application works fine, You’re almost done! Make sure to commit/push these changes to your repo, so Heroku receives all files we just added.
Deploying your App on Heroku, The above workflow was just standard git stuff, now we make our Heroku deployment. To use Heroku from the command line, you need to have the Heroku-Toolbelt installed. If you are done, open your Terminal and type:
This can take some time, depending on your project size. You can now try to open your app:
And if you get stuck… Ask Here
email me firstname.lastname@example.org