Skip to content

Express API with Docker and CI Baseline

Set up an Express API scaffold with container and CI automation enhancements that are supported by tinkerise.

  • Node.js 20.11+
  • tinkerise installed
  • Docker installed
Terminal window
tinkerise backend express inventory-api --typescript
cd inventory-api

Expected result: an Express project generated by the official scaffolder flow.

Step 2: Add quality and delivery enhancements

Section titled “Step 2: Add quality and delivery enhancements”
Terminal window
tinkerise add eslint prettier ci docker env

This adds linting, formatting, GitHub Actions CI, container files, and environment scaffolding.

Terminal window
npm install
npm run lint
npm test

Expected result: lint and test commands complete successfully for the generated baseline.

Terminal window
docker build -t inventory-api .
docker run --rm -p 3000:3000 inventory-api

Verify the service starts in the container and listens on the expected port.

Push to GitHub so the generated workflow executes on pull requests.

Expected result: CI runs lint/test/build checks with the generated configuration.

  • Express app source and scripts from scaffolder
  • .github/workflows/ci.yml from CI enhancement
  • Dockerfile and .dockerignore from Docker enhancement
  • .env.example and related env templates from env enhancement
  1. Add commit policy with tinkerise add husky commitlint.
  2. Add dependency automation with tinkerise add renovate.
  3. Compare runtime notes in the Express guide.