Here's what I've been doing and it has been working pretty good. We have to 
deploy RPMs.

In package.json:

   - set private: true
   - set dependencies to specific versions
   - set devDependencies to mostly specific versions
   - set the bundleDependencies array to include all modules that should be 
   shipped in production (basically everything but devDependencies)
   - set files array to include all the files / directories that should be 
   shipped (or use an npmignore file if you prefer)
   - set os and cpu to whatever your target platform is
   
npm-shrinkwrap.json

   - generate this using the dependencies you tested everything with
   
Repo (git, cvs, perforce, whatever)

   - We check in the whole node_modules folder to our code repository 
   including all of the sub dependencies with one caveat: compiled (binary) 
   files were manually removed prior to check in. This was a minor pain but if 
   you have only one or two modules with native code, not too bad.
   
Makefile

   - include the typical flags from your build server
   - targets
      - all - on my system this checks for an up to date version of python 
      and then just runs 'npm install'. 
      - install - does an 'npm install'
      - dist - does an 'npm pack' basically.
      - rpm - this actually ends up building rpms from the dist package
      - clean - does the usual cleanup
      - lint, test ... a few other helper targets. Check the Makefile for 
      Express.JS as an example.
      
Spec file

   - Needed for building RPMs. Basically it takes the tarball that you got 
   from doing 'npm pack', puts it in a different directory for building, runs 
   make on it install (which doesn't download anything since all the node 
   modules were in bundledDependencies), recompiles for the target platform, 
   and wraps it all in an RPM.

Startup script

   - Started out with a couple of basic init.d scripts but planning to 
   upgrade them to either user forever or monit. Both are good.

Hope that helps. Hopefully you don't have to build rpms either!


-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to