Skip to main content

Requirements

Node.js

The EPR LAPS Backend requires Node.js >= v22.16.0 and npm >= v11.
We recommend using Node Version Manager (nvm) to manage Node.js versions.
1

Install Node.js

Install Node.js v22 or higher using nvm:
nvm install 22
2

Use the correct Node version

Navigate to the project directory and use the correct Node.js version:
cd epr-laps-backend
nvm use
This reads the .nvmrc file in the project root and switches to the specified Node.js version.
3

Install dependencies

Install all application dependencies:
npm install
4

Start the development server

Run the application in development mode:
npm run dev
The server will start with hot-reloading enabled on port 3001 by default.

Available NPM Scripts

All npm scripts are defined in package.json. Run npm run to see all available commands.

Development Scripts

npm run dev
  • 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 at 0.0.0.0 with breakpoint
  • npm run docker:dev - Alias for npm run dev used in Docker containers

Production Scripts

npm start
Runs the application in production mode (NODE_ENV=production) with strict mode enabled.

Code Quality Scripts

npm run format
  • npm run format - Formats all .cjs, .js, .json, and .md files using Prettier
  • npm run format:check - Checks formatting without making changes
  • npm run lint - Lints all JavaScript files using ESLint with caching
  • npm run lint:fix - Auto-fixes linting issues where possible

Git Hooks

npm run git:pre-commit-hook
Runs format checking and linting before commits. This is automatically configured via Husky.

Windows Development

If you experience line break formatting issues on Windows, update your global Git configuration:
git config --global core.autocrlf false

Update Dependencies

To update project dependencies, use npm-check-updates:
ncu --interactive --format group
This allows you to interactively select which dependencies to update, grouped by update type (major, minor, patch).

Next Steps

Configuration

Learn about configuration options using convict

Testing

Run tests and generate coverage reports

Build docs developers (and LLMs) love