Skip to content

Instantly share code, notes, and snippets.

@pauldougan
Last active January 20, 2024 20:40
Show Gist options
  • Save pauldougan/614002d12a87e4278da290fa7dd657bf to your computer and use it in GitHub Desktop.
Save pauldougan/614002d12a87e4278da290fa7dd657bf to your computer and use it in GitHub Desktop.
Notes on running nodejs

Notes on configuring Node.js for use with the GOV.UK prototype kit

We use the Node.js based GOV.UK prototype Kit to work with prototypes.

The GDS Way advises the use of LTS node versions.

Node.js versions

The most recent Node.js LTS version is 20.11.0 released on 9 Jan 2024.

Decision Use Node.js 20.11.0

Managing Node.js environment locally

use nvm installed via homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install nvm

Running a prototype locally using local Node.js

todo

Running a prototype locally using Docker

# Dockerfile

#! /bin/bash
set -e
docker build . --tag govuk-one-login-docs
docker run -p 4567:4567 -p 35729:35729 -v $(pwd):/usr/src/docs -it govuk-one-login-docs
hardware os_name os_version os_package_installer os_package_installer_version language_name language_version version_manager version_manager_version dependency_manager dependency_manager_version
2.6 GHz 6-Core Intel Core i7 MacOS Ventura 13.6.3 brew 4.2.4 node.js nvm npm 2.1.4
Linux raspi4 Debian apt node.js nvm npm 2.1.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment