This time we will create external JavaScript files to be called from the NodeJS command prompt.
Create a new JavaScript file (for instance I've created sample.js).Add the following JavaScript lines as an example:
When we call an external file from the nodejs command prompt, it shall write “Pooff” as output.
Store this file in a close destination that is easy to access later from the command prompt. Now open the “Nodejs Command Prompt” application and call this:
Then press Enter and see what happens. For me, I get:
It's that easy to call external files with Nodejs.
Do you want a much more complicated and useful solution? The next article will be about that.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: