2

For example, if your package.json file contains:

"scripts": {
        "start": "make start", 
        "test": "make test", 
    }

^ Will nodejitsu be able to parse and implement "make start"?

kevmo
  • 677
  • 1
  • 8
  • 20
  • :) I'm pretty sure you've already found the answer by now but for anyone stumbling to this post the answer is yes and no. No, in a sense that it doesn't literally use `make` command but yes in a sense that there's another command that does that for you called `npm`. `npm` now supports `npm scripts` meaning, anything inside `"scripts"` object can be run by doing `npm run `. There are also pre-defined keys which you can just run it straight away without typing `run` like `npm start` `npm test` and there are bunch of others which can be found [here](https://docs.npmjs.com/cli/start) – shriek Jul 13 '15 at 03:36

2 Answers2

0

If the server.js file contains the static file path of the following directory then only the makefile functionality will work.

user2845121
  • 103
  • 3
  • 9
0

Nodejitsu should parse this just fine. Just be sure that you are calling node <app file>.js in your Makefile somewhere, or you change it to make start && node <app file.js>. Nodejitsu uses npm start to start your application, so the Makefile exiting without starting the app would cause the deployment to fail.

Sly
  • 1,145
  • 7
  • 19
  • I'm having a problem with this. Using "make && node server.js" is throwing "Cannot find module '/opt/run/snapshot/package/make" – shanks Jun 01 '14 at 10:13
  • No idea. Something may have changed in NPM. I know that it used to work by doing this. – Sly Jun 02 '14 at 16:24