This implements an extremely simplified version of the /bin/ls command. Next you can write a simple script like this (name it ls.js) var fs = require( 'fs') įor ( var fn in files) If these work, they'll print out appropriate outputs. You can test the installation by running a couple commands: $ node - help $ npm help Homebrew - assuming you already have Homebrew installed $ brew install nodeīoth install two commands, node and npm, in the path controlled by each tool. MacPorts - assuming you already have MacPorts installed.
However, I prefer to use a package manager to install it because it's much easier to update as new Node releases are shipped. There is an installer available for Mac OS X at There's a few ways of doing this, and I wrote up an excellent outline in Chapter 2 of my book Node Web Development - see link in the sidebar. Installing Node.js on Mac OS Xįor the first step towards this we just install Node on Mac. In the end the goal is to have a mac-centric toolkit for managing Node.js processes primarily for development purposes.
#INSTALL EXPRESS GLOBALLY MAC HOW TO#
Rather than rope people into using a special application, why not just show how to set up the Node.JS / Apache / nginx / MySQL / etc stuff on a Mac, using free software package managers like Brew of MacPorts. It gives you a nice control panel to start/stop/configure the processes so you can easily run your application in different environments.īut rather than develop an application/package to manage it, what I'm thinking is it'll be just as useful to write up instructions on what to do. It's simple, just download MAMP and it launches Apache, MySQL, PHP, etc for you, easy peasey. Installing MongoDB on Mac OS X Mavericks for Node.js developmentįor years MAMP has been the go-to application to help with PHP/MySQL development on Mac OS X.Using forever to manage Node.js processes.