2

I am building an app follow this tutorial

Basically, it is a rails app that is separate from the front-end.

I am using gulp to compile everything and utilizing a Gulp proxy to talk to the back end via the /api path. Gulp compiles all the front-end code to a single directory.

I am struggling to understand how to deploy an app like this to Heroku and have the front-end part of the app talk to the rails backend.

Does anyone have any experience deploying an app like this to Heroku?

striff88
  • 97
  • 2
  • 10
  • You may want to look at having a background worker dyno run your Rails app + your public-facing web dyno running Gulp. See this for details: https://devcenter.heroku.com/articles/background-jobs-queueing - you can specify the different dynos in your Procfile. – elithrar Jul 14 '15 at 23:05

1 Answers1

2

I published a blog post about this. It's called "Angular on Rails Deployed to Heroku Using Gulp"

  1. Configure multiple buildpacks, setting ruby and node. See the Heroku official documentation.

  2. Configure gulp to build in the ./public directory at the root of the app.

  3. Configure an npm postinstall script that builds your app

Have fun!

grant
  • 4,325
  • 2
  • 24
  • 20