Welcome to my Code Snippets

MyCodeSnippets.Space

nodejs.module

ReAdABLE Source (What is the ReAdABLE Human Format?)

http://mycodesnippets.space/nodejs/nodejs.module.red

Module Creation


exports.now = function() {
    var today = new Date();
    var hours = today.getHours();
    var minutes = today.getMinutes();
    var seconds = today.getSeconds();
    var milliseconds = today.getMilliseconds();
    return today;
}
        

Module Usage


var utils = require("./utils.js");
now = utils.now;

console.log('hello');
var greetings = 'hello';
console.log(now()+ ": " + greetings);