Script to set up local-npm as a LaunchAgent on OS X, so that you can get up and running with local-npm
in no time.
Run this command (without sudo!):
curl -sL https://raw.githubusercontent.com/nolanlawson/local-npm-launch-agent/master/script.py | python -
- Installs
local-npm
,pm2
, andnpmrc
globally. - Creates a LaunchAgent to run
pm2
andlocal-npm
. - Creates an
npmrc
calledlocal
that points to local-npm. - Starts it up.
When you restart your machine, local-npm
will already be up and running.
To see the output logs, you can run:
pm2 logs all
To switch back to regular npm, you can run:
npmrc default
You can also visit http://localhost:5080/_browse in a browser to confirm that local-npm
is up and running.
If at any point you want to uninstall all this stuff, just do:
launchctl unload ~/Library/LaunchAgents/com.nolanlawson.localnpm.plist
rm -fr ~/.local-npm ~/.npmrcs/local ~/Library/LaunchAgents/com.nolanlawson.localnpm.plist
npmrc default