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" },
  "main" : "",

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