Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 498 Bytes

README.md

File metadata and controls

11 lines (8 loc) · 498 Bytes

NodeJS module examples

Simple examples of different flavors to create modules in NodeJS


  • basic.js - just exports method as they are
  • singleton.js - exports a singleton object and its methods
  • obj-instance.js - exports an object constructor to initialize object before it's usage
  • obj-instance.js - exports an object instantiated at runtime - also consructor to show up the difference
  • test-server.js - an example including all the different require methods