How to write a Node module