Run CoffeeScript Node.js Apps on Heroku

If you’ve written your Node.js app in coffeescript entirely and at the time of deploying on Heroku wondering how heroku would execute your coffee code, then here’s the simple process that you need to follow.

Add the coffee-script npm package into your package.json or just install it with the --save flag that’ll auto-add anyway.

What's the one thing every developer wants? More screens! Enhance your coding experience with an external monitor to increase screen real estate.

$ npm install --save coffee-script

Then, instead of using the node command in your Procfile use this –

web: coffee

I’m assuming that the is your node app script that needs to be executed to start your web app. Hope this quick tip helps some!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Author: Rishabh

Rishabh is a full stack web and mobile developer from India. Follow me on Twitter.

3 thoughts on “Run CoffeeScript Node.js Apps on Heroku”

  1. Thanks for the post. What I have been wondering about is that if we add this layer of coffeescript at runtime, what type of performance penalty would we be looking at? Or, is that something we even need to be concerned about? I wasn’t able to find much on the subject.

      1. If you’re invoking your app like “coffee”, I imagine you’d incur some penalty because the coffeescript code os being converted to javascript on the fly. I better way to run coffeescript apps on Heroku is to use custom buildbacks. If you’re using Cedar-14, you can use my buildpack here:

Leave a Reply

Your email address will not be published. Required fields are marked *