A minimal full-stack TypeScript template. The API serves static assets over HTTPS and the web app provides the front-end UI.
- Node.js
>=24.0.0 - npm
>=11.0.0
- Install dependencies at the repo root:
npm install- Build the apps:
npm run build- Create your environment file:
cp .env.example .env-
Update
.envvalues (see Environment Variables below). -
Run the server:
npm run startThe API reads these values from .env:
KEY_PATH: Path to your TLS private key.CERT_PATH: Path to your TLS certificate.WEB_ROOT: Absolute path to the web build output (e.g.[...]/apps/web/dist).HOST_NAME: Bind address (e.g.0.0.0.0).PORT: HTTPS port (e.g.8443).
From the repo root:
- Build all:
npm run build- Build api:
npm run build:api- Build web:
npm run build:api- Lint all:
npm run lint- Lint api:
npm run lint:api- Lint web:
npm run lint:web- Format all:
npm run format- Format api:
npm run format:api- Format web:
npm run format:web- Start server:
npm run start- Watch all:
npm run monitor- Watch api:
npm run monitor:api- Watch web:
npm run monitor:webapps/api: HTTPS static file server.apps/web: Front-end assets (bundled by webpack).
- Minimal, explicit tooling.
- TypeScript in both API and web.
- Linting that enforces declared dependencies.
- HTTPS local serving out of the box.
- Web assets are built into
apps/web/distand served by the API. .envis ignored by git (see .gitignore); use.env.exampleas a template.