Tagged: nodejs

0

Dynamic module loading with require

Let’s say we have ./darwin.js for mac, ./win32.js for Windows in the current working directory. And we want to require one of them in ./index.js based on which platform the file is being ran....

0

set the default node version using nvm

If you are using nvm for managing nodejs(which is the recommended way), you can easily ensure that the same version of nodejs is available in all terminal windows or tabs. Below are some helpful...

Show Buttons
Hide Buttons