Tuesday, October 4, 2011

npm, nvm, and firewalls

So I just finished going through a wonderful experience getting npm, nvm, and so on installed on a system behind a firewall at the local university.  Specifically, I was having problems with this url:
https://registry.npmjs.org/npm

Now I was using a mac, and didn't want to deal with loading all the certs I might require, so I downloaded hte install.sh file (curl http://npmjs.org/install.sh > install.sh), changed the URL to use HTTP, and it worked without a hitch.

I needed to make a similar change when installing jasmine-node, the registry in NPM is automatically set to use the HTTPS repository:

npm config set registry http://registry.npmjs.org/

Everything seemed to move smoothly after these changes.  Personally, I'm not sure we need to use HTTPS for either of these.  I suppose I could inject changes into the stream if I was evil, and using an encrypted channel helps protect from this, but I'm somewhat skeptical that this is really a big deal.

Also installed NVM; love it! I know there's other version managers for node out there, but this one's doing the trick for me.  I configure a bit differently though, using a .nvmrc file (that is in turn sourced from my .bashrc) that contains a single line:

[[ -s "$HOME/.nvm/nvm.sh" ]] && . "$HOME/.nvm/nvm.sh"

This is adopted from RVM, another great version manager.  Now that I have this out of the way, I'm going to get started on my list server.  The next posts will cover initial domain design and project repository structure.

No comments:

Post a Comment