+ All Categories
Home > Technology > Codemash - Building Custom node.js Modules

Codemash - Building Custom node.js Modules

Date post: 13-Jul-2015
Category:
Upload: kevin-griffin
View: 192 times
Download: 3 times
Share this document with a friend
Popular Tags:
24
Building node.js Modules Kevin Griffin CodeMash 2.0.1.5
Transcript

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

What are modules?

Why modules?

Package Managers

npmjs.org

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

npm publish

And let there be code…

Thanks for attending!

Kevin Griffin

[email protected]/1kevgriff

http://bit.ly/GriffDevLink1


Recommended