Node.js Container¶
The Node.js container is tailored for development and runs in watch mode, allowing for rapid feedback cycles during coding.
Dockerfile: devops/dev/node/Dockerfile
Watch mode¶
The container automatically restarts or rebuilds when changes are detected in JavaScript, TypeScript, SCSS, or related files — no need to manually restart processes.
Docker-only Node runtime¶
Due to environment constraints and the need for a specific Node.js version, all Node-related development is done inside the Docker container. Do not rely on a locally installed Node.js for this project.
Node version management (NVM)¶
NVM is pre-installed in the container. To switch Node.js versions:
docker exec -it barberklingen-<site>-node nvm install <version>
docker exec -it barberklingen-<site>-node nvm use <version>
Replace <site> with the appropriate project identifier.