Menu

πŸ“°
0

Reddit - Please wait for verification

TypeScriptΒ·/u/KaisertoniΒ·3 days ago
#fiIoH2u5
Reading 0:00
15s threshold

Every time I started a new Node.js API project I'd spend the first day wiring up the same stuff before writing a single line of actual business logic. So I built a boilerplate I'm happy with and open sourced it. Here's what's in it and why: No build step. The project runs TypeScript natively via Node's --env-file flag and type stripping. No tsc --build, no output directory. Your .ts files are run directly by Node β€” no compilation step in between. Zod everywhere. Request bodies, query params, and env vars are all validated with Zod schemas. The same schemas auto-generate your OpenAPI docs (JSON + YAML), so your documentation is never out of sync with your actual API. Security defaults out of the box. Helmet, CORS, and express-rate-limit are all wired up. Small config, big difference in production. Linter + formatter. Dropped ESLint + Prettier in favour of oxlint and oxfmt β€” both written in Rust, significantly faster in CI and pre-commit hooks.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More