Deployment Overview of Node.js on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the server must meet the following requirements:
-
Operating System: Ubuntu or Debian-based Linux distribution.
-
Privileges: Root or sudo access is required to install system packages and manage repositories.
-
Network Access: The server must have outbound internet access to reach NodeSource repositories and APT package mirrors.
-
System State:
cloud-initmust have completed its initial setup before the installation process begins.
Application Installation Process¶
The application environment is set up using a system-level installation method targeting the OS package manager. The following steps are performed:
-
Prerequisite Package Installation: The system installs
curlandnpmvia theaptpackage manager to facilitate repository management. -
Repository Configuration: The NodeSource APT repository is added to the system to ensure access to the latest stable Node.js versions.
-
Node.js Installation: The
nodejspackage is installed from the newly configured NodeSource repository. -
Verification: The installation is verified by executing
node -vto confirm the presence of the runtime in the system path.
Access Rights and Security¶
-
Package Management Security: During the installation, the process waits for any existing
dpkgoraptlocks to be released to prevent database corruption. -
System Updates: The package lists are updated (
apt update) prior to installing dependencies to ensure all software is sourced from secure, up-to-date repositories.
Application Update Instructions¶
To update the Node.js runtime and associated system dependencies, use the standard package manager commands:
Available Ports for Connection¶
The application utilizes the Node.js runtime; specific application ports are determined by the application configuration once the service is initialized. Standard web traffic typically flows through port 80 or 443.