When using the expressjs-framework extension, there are four different cases
for customising the Ubuntu base and the Node version to be included.
The main differences are:
- whether the bare base is used or the Ubuntu 24.04 base is used.
- whether Node is installed from Ubuntu packages or the NPM plugin.
In this section of the document, we will discuss the possible combinations of Ubuntu bases and possible usages of NPM plugin.
The following example uses the Ubuntu 24.04 base and Node from Ubuntu packages.
base: ubuntu@24.04
extensions:
- expressjs-frameworkIn this case, the application is installed and run via Node and NPM is installed by the Ubuntu packages. The NPM and Node versions are determined by the versions of NPM and NodeJS shipped with the Ubuntu base. See the NodeJS version shipped with the corressponding Ubuntu base from the chilsel-slices repository. This link to the slices repository is an example of the NodeJS version shipped with the Ubuntu 24.04 base.
The following example uses the Ubuntu 24.04 base and Node from the NPM plugin.
base: ubuntu@24.04
extensions:
- expressjs-framework
parts:
expressjs-framework/install-app:
npm-include-node: true
npm-node-version: 20.12In this case, the application is installed and run via Node, and NPM is installed by the NPM plugin.
The following example uses the bare base and Node from Ubuntu packages.
base: bare
build-base: ubuntu@24.04In this case, the application is installed and run via Node and NPM is installed by the Ubuntu packages. The NPM and Node versions are determined by the versions of NPM and NodeJS shipped with the Ubuntu base. See the NodeJS version shipped with the corressponding Ubuntu base from the chilsel-slices repository. This link to the slices repository is an example of the NodeJS version shipped with the Ubuntu 24.04 base. See the NPM version shipped with the corressponding Ubuntu base from the Ubuntu packages archive from the Ubuntu packages search.
The following example uses the bare base and Node from the NPM plugin.
base: bare
build-base: ubuntu@24.04
parts:
expressjs-framework/install-app:
npm-include-node: true
npm-node-version: 20.12In this case, the application is installed and run via Node and NPM is installed by the NPM plugin. For different possible inputs for npm-node-version, refer to the NPM plugin documentation.