NodeJS Custom Start Script on OpenShift

The nodejs cartridge provides Node.JS on OpenShift. The default entry point for the nodejs cartridge is /server.js, which can be changed with the following package.json entry:

"scripts": { "start": "supervisor <relative-path-from-repo-to>/app.js" },

However, we couldn’t get node to cooperate without this additional package.json entry:

  "scripts" : { "start" : "supervisor app.coffee" },
  "main" : "app.coffee",

Of course, use of coffeescript requires a corresponding entry in the dependencies section.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s