Amit
Amit

Reputation: 7035

putting node on heroku- Getting started

I am a begineer with Node and Heroku.

Was going through this link https://devcenter.heroku.com/articles/nodejs wherein they have a section "Declare Dependencies With NPM".

{
  "name": "node-example",
  "version": "0.0.1",
  "dependencies": {
    "express": "2.5.x"
  },
  "engines": {
    "node": "0.8.x"
  }
}

What i couldn't understand from this section is where do i keep my package.json file. also how do i install dependencies locally

thanks Amit

Upvotes: 0

Views: 628

Answers (1)

Yusuf X
Yusuf X

Reputation: 14633

Keep your package.json in the same directory as your source code (for starters, anyway). Install dependencies with npm (for example, "npm install [email protected]"). After you install the Heroku toolbelt, then you can run your server locally with 'foreman start', and it will run the same way it would remotely on Heroku.

Upvotes: 3

Related Questions