Hey,
-g installs the module globally. I believe both ways work just the same. Installing globally means you don't have to install the module into every different folder.
Thanks,
Daryl