Skip to main content

NodeJS

Description

NodeJS is a cross-platform environment for developing client-side applications based on the JavaScript programming language. NodeJS is open source and is based on the Chrome V8 engine, which allows JavaScript to be translated into machine code.

Getting started

NodeJS is installed along with an image. To work with NodeJS you can use node и npm commands.

You can connect to the server via SSH:

  • With an SSH key, if this option is enabled before a server is created
  • With the root user password sent by mail when server is activated

Working with n utility - NodeJS vesions manager

NodeJS versions installation

To install a specific NodeJS version, execute the following command:

n VERSION

There are many ways to specify the NodeJS version for the n command.

Numeric version numbers can be complete or incomplete, with an optional v character:

  • 20.5.1
  • 8: 8.x.y version
  • v6.1: 6.1.x version

There are also tags for two particularly useful versions:

  • lts - latest release Long Term Support
  • latest, current - latest version available

Changing NodeJS version

To select NodeJS among installed ones, execute the command:

n

Then use the arrows on the keyboard to select the desired version.

Removig NodeJS versions

To remove a NodeJS vesrion, execute a command:

n rm VERSION

List available versions for installation

To list the available versions of NodeJS for installation, run the command:

n ls-remote

The command will display the first 20 available versions. To get a list of all versions, you will need to use the --all key:

n ls-remote --all

Software installed

NameLicense
NodeJSMIT license
NpmArtistic License 2.0
nMIT License

For more information about the installed packages, please refer to their official documentation: