Requirements
Node.js
The EPR LAPS Backend requires Node.js >= v22.16.0 and npm >= v11.Use the correct Node version
Navigate to the project directory and use the correct Node.js version:This reads the
.nvmrc file in the project root and switches to the specified Node.js version.Available NPM Scripts
All npm scripts are defined in
package.json. Run npm run to see all available commands.Development Scripts
npm run dev- Runs the server in development mode with hot-reloading (NODE_ENV=development)npm run dev:debug- Runs with inspector enabled for debugging at0.0.0.0with breakpointnpm run docker:dev- Alias fornpm run devused in Docker containers
Production Scripts
NODE_ENV=production) with strict mode enabled.
Code Quality Scripts
npm run format- Formats all.cjs,.js,.json, and.mdfiles using Prettiernpm run format:check- Checks formatting without making changesnpm run lint- Lints all JavaScript files using ESLint with cachingnpm run lint:fix- Auto-fixes linting issues where possible
Git Hooks
Windows Development
Update Dependencies
To update project dependencies, use npm-check-updates:Next Steps
Configuration
Learn about configuration options using convict
Testing
Run tests and generate coverage reports