Building node.js ModulesKevin Griffin
CodeMash 2.0.1.5
Kevin Griffin
Independent Consultant.Bootstrapper.All around nice guy.
[email protected]/1kevgriff
Simple Windows Server Monitoring14-day Free Trial
http://winsitter.com
http://wintellectnow.com
Promo Code: GRIFFIN-13
Giveaway!1) 1 annual subscription2) Beats by Dr. Dre Earbuds
Text “NODE” to
(567) 998-4644
Three types of modules
require(‘myModule’)
require(‘./myFile’)
require(‘./myFile.js’)or
require(‘./myFile.json’)
require(‘./myFolder’)
require(‘./myFolder/index.js’)
Demo: Road to Module Independence
Getting Setup to Publish to npm
1.Create new user account at npmjs.org2.Go to terminal/command prompt
npm set init.author.name "Your Name"npm set init.author.email "[email protected]"npm set init.author.url "http://yourblog.com“
npm adduser
npm initnpm publish
And let there be code…
Thanks for attending!
Kevin Griffin
[email protected]/1kevgriff
http://bit.ly/GriffDevLink1