Game Development Reference
In-Depth Information
Figure 8-6. The Node.js installer.
Once you install Node.js you will be able to start setting up a simple project workflow. There
are a few automation tools out there, but I ended up settling on one called Grunt, which you
can learn more about at http://gruntjs.com . Grunt is basically the Node.js equivalent of Ant
and for the most part is actually better in many ways since you can use your existing
JavaScript skills to write automated tasks and when used with NodeJS you can automate and
serve your entire project from the same folder.. Another important reason to use Node.js is so
we can create a constant working environment for our project. While you can easily just run
a server from the command line, Grunt will allow us to do some powerful workflow automa-
tion tasks, which I will talk about in the next chapter. In order to install Grunt or any other
Node.js modules, you need to do a few things on the command line, so open that up.
To install Node.js modules we will be using a utility that comes with the Node.js install
called NPM. This command line-based app will go out and fetch modules for you and install
them globally or in your project. To get started, simply type the following to make sure NPM
is correctly installed:
> npm
Search WWH ::




Custom Search