Tutorial by Examples

Require is a statement that Node interprets as, in some sense, a getter function. For example, say you have a file named analysis.js, and the inside of your file looks like this, function analyzeWeather(weather_data) { console.log('Weather information for ' + weather_data.time + ': '); consol...
Node's require is also very helpful when used in tandem with an NPM package. Say, for example, you would like to use the NPM package require in a file named getWeather.js. After NPM installing your package through your command line (git install request), you are ready to use it. Your getWeather.js f...

Page 1 of 1