node.js Back



i. Update the version of node and npm
  • check the version
npm -v
  • get the n
sudo npm install -g n
  • get the stable version of node.js
sudo n stable
  • update npm
sudo npm install -g npm@latest
sudo npm install -g npm@lts
ii. Require models
  • install models
# install it in the local directory
npm install <model_name>


# install it in the global environment
sudo npm install -g <model_name>
  • use the models (eg. request)
var request = require('request');
iii. Run the script
node script.js
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.