# Has anyone deployed an Ionic app to Heroku?

**URL:** <https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284>\
**Category:** ionic-v1\
**Created:** [August 15, 2014, 1:26pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284 "2014-08-15T13:26:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawnlauzon](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@shawnlauzon](https://forum.ionicframework.com/u/shawnlauzon)\
**Post date:** [August 15, 2014, 1:26pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/1 "2014-08-15T13:26:03Z")

</div>

I’m trying to do that now, unsuccessfully. It recognizes it as a node.js app and doesn’t output any errors. However, the launch page doesn’t show up. I’ll continue to work on it; just wondering if others have some experience. Thanks!

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [August 15, 2014, 1:34pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/2 "2014-08-15T13:34:30Z")

</div>

Check out this article, using ionic and node on heroku

[http://coenraets.org/blog/2014/08/employee-directory-sample-app-with-ionic-and-node-js/](http://coenraets.org/blog/2014/08/employee-directory-sample-app-with-ionic-and-node-js/)

---

<div class="post-metadata">

**Author:** ![shawnlauzon](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@shawnlauzon](https://forum.ionicframework.com/u/shawnlauzon)\
**Post date:** [August 15, 2014, 1:41pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/3 "2014-08-15T13:41:05Z")

</div>

Thanks M. That article just says “click the Deploy to Heroku button”, but it does confirm that it can be done. I actually think it’s as simple as creating a `Procfile` which says:

```
web: ionic serve

```

but I’m having other problems at the moment.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [August 15, 2014, 1:56pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/4 "2014-08-15T13:56:01Z")

</div>

Ahh alright, maybe you should check out this article

> **[Deploying a Yeoman/Angular app to Heroku — SitePoint](https://www.sitepoint.com/deploying-yeomanangular-app-heroku/)**
>
> So you’ve used Yeoman to Kickstart your AngularJS app and now you’re ready to show it to the world? Well you can, by deploying it to Heroku! Prerequisites To get the most out of this tutorial we recommend you have the following skills and resources...

Since it’s straight angular, it will be pretty relevant.

---

<div class="post-metadata">

**Author:** ![shawnlauzon](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@shawnlauzon](https://forum.ionicframework.com/u/shawnlauzon)\
**Post date:** [August 15, 2014, 2:20pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/5 "2014-08-15T14:20:03Z")

</div>

Success! With a combination of those articles, plus simply [Serving static content from node][1] and Heroku’s [Getting started with nodejs][2], success.

1. Add a dependency to express in `package.json`:

````auto
"dependencies": {
    "express": "4.8.4",
```

2. Create a web.js file like this:

````

var express = require(‘express’);  
var app = express();

app.use(express.static(\_\_dirname + “/www”));  
app.listen(process.env.PORT || 5000);

```auto

3. Create a `Procfile` to launch this:

```

```
web: node web.js

```

```auto

Now you should be able to launch the server using [Foreman][3] by typing:

```

foreman start

```auto

Push it to github, ensure there's one dynamo running by typing:

```

heroku ps:scale web=1

```auto
and should be good to go. Thanks for the tips!

  [1]: http://blog.modulus.io/nodejs-and-express-static-content
  [2]: https://devcenter.heroku.com/articles/getting-started-with-nodejs
  [3]: http://blog.daviddollar.org/2011/05/06/introducing-foreman.html
```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [August 15, 2014, 2:22pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/6 "2014-08-15T14:22:43Z")

</div>

Awesome! glad to know to hear you got it to work now 😄

---

<div class="post-metadata">

**Author:** ![keithdmoore](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/keithdmoore/32/64408_2.png) [@keithdmoore](https://forum.ionicframework.com/u/keithdmoore)\
**Post date:** [August 15, 2014, 3:30pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/7 "2014-08-15T15:30:25Z")

</div>

@shawnlauzon I am very curious as to why you are deploying an ionic app to Heroku? For demo purposes ?

---

<div class="post-metadata">

**Author:** ![shawnlauzon](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@shawnlauzon](https://forum.ionicframework.com/u/shawnlauzon)\
**Post date:** [August 15, 2014, 3:46pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/8 "2014-08-15T15:46:21Z")

</div>

Yes, just demo purposes, and to demonstrate functionality to people without having to generate a real app.

---

<div class="post-metadata">

**Author:** ![thomasfl](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@thomasfl](https://forum.ionicframework.com/u/thomasfl)\
**Post date:** [November 13, 2014, 9:20am UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/9 "2014-11-13T09:20:04Z")

</div>

> [@mhartington](#):
>
> [http://coenraets.org/blog/2014/08/employee-directory-sample-app-with-ionic-and-node-js/](http://coenraets.org/blog/2014/08/employee-directory-sample-app-with-ionic-and-node-js/)

Great tip! Just click on the “Deploy to Heroku” button on the page above. Then simply run:

```
heroku git:clone -a <app-name>
cd <app-name>
rm -r www
cp -r ~/my_ionic_app/www
git add --ignore-removal .
git commit . -m'initial commit'
git push

```

Now just replace the contents of the www folder with the contents of a a new one, do a git push and you’re basically good to go. 😄

---

<div class="post-metadata">

**Author:** ![salehrastani](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/salehrastani/32/85073_2.png) [@salehrastani](https://forum.ionicframework.com/u/salehrastani)\
**Post date:** [April 17, 2015, 5:51pm UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/10 "2015-04-17T17:51:27Z")

</div>

A clear and step-by-step explanation of deploying an Ionic app to Heroku:

[http://devdactic.com/deploying-ionic-to-heroku/](http://devdactic.com/deploying-ionic-to-heroku/)

---

<div class="post-metadata">

**Author:** ![rasor88](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rasor88/32/108773_2.png) [@rasor88](https://forum.ionicframework.com/u/rasor88)\
**Post date:** [April 22, 2017, 2:55am UTC](https://forum.ionicframework.com/t/has-anyone-deployed-an-ionic-app-to-heroku/8284/11 "2017-04-22T02:55:50Z")

</div>

Check out [http://blog.ionic.io/heroku-ionic/](http://blog.ionic.io/heroku-ionic/)  
From that project:

Copy

- app.json
- server.js  
Copy from
- package.json  
– Add depency express
