Configure NodeJs on DXP Linux (NetCore)

  • Updated

This article describes how to configure NodeJs for DXP Linux containerized environment.
This is applicable to DXP Linux container for CMS 12 and Commerce 14 projects only.

Background 

NodeJs is a required component to be installed on web server to use the features of Microsoft.AspNetCore.NodeServices or Microsoft.AspNetCore.SpaServices.Extensions.

 

Configuration steps

  1. Create the file dxpPlatformSettings.json at the root folder (same folder as appSettings.json)
    Make sure to set "Copy to Output Directory" to "Copy if newer" in Visual Studio.
  2. Add configuration to dxpPlatformSettings.json
    Example:
    {
    "$schema": "https://schema.episerver.net/paasportal/2022-03-24/platformschema.json",
    "platformPackages": [
    {
    "name": "NodeJs",
    "version": 14
    }
    ]
    }
    "version" value is the major release of NodeJs and must be integer.
  3. Build, package output files with dxpPlatformSettings.json and deploy to DXP.

 

References