/NodeJS_Module-1

FantaCode I Task #4 I Simple Node.JS module

Primary LanguageJavaScript

FantaCode I Task #4 I Simple Node.JS module

NodeJS_Module-1

Example to create a module that returns a date and time object:

myfirst.js

save the code above in a file called "myfirst.js"

index.js

Save the code above in a file called "index.js", and initiate the file:

Initiate index.js:

open terminal >> Terminal Command

C:\Users\Your Name>node index.js

Open Browser and Enter URL >>

localhost:8080 // to see output on Web-browser.

Output:

output