NodeJS Series #3: Using External Files

Hello Wizards, This time we will create external .js files to call from NodeJS Command Prompt. Create a new .js file (for instance I’ve created sample.js). Add these javascript lines as an example: [sourcecode language=”javascript”] console.log("Poooff"); [/sourcecode] When we call external file from nodejs command prompt,it shall write “Pooff” as an output. Store this file to a close destination,easy to access later from command prompt.Now open “Nodejs Command Prompt” application and call this: Then press enter and see what happens.According to me,I get this one: Its that easy to call external…

Read More