1.5.0 โ€ข Published 6 months ago

@shuvamk/create-node-server v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Express TypeScript Starter

A production-ready Express.js starter template with TypeScript, featuring comprehensive tooling, security best practices, and monitoring capabilities.

Features

  • ๐Ÿš€ TypeScript - Write better, more maintainable code
  • ๐Ÿ“Š OpenTelemetry - Distributed tracing out of the box
  • ๐Ÿ”’ Security - Helmet, CORS, and rate limiting preconfigured
  • ๐Ÿ“ API Documentation - Swagger/OpenAPI integration
  • ๐Ÿชต Logging - Structured logging with Pino
  • ๐Ÿ” Error Tracking - Sentry integration
  • โšก Performance - Response compression
  • ๐Ÿงช Testing - Jest setup for unit tests
  • ๐Ÿ’… Code Quality - ESLint, Prettier, and Git hooks

Quick Start

npx create-express-ts-starter my-app
cd my-app
npm install
npm run dev

Available Scripts

  • npm run dev - Start development server with hot reload
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Lint code with ESLint
  • npm run format - Format code with Prettier
  • npm test - Run tests

Environment Variables

Copy .env.example to .env and configure:

cp .env.example .env

See .env.example for all available options.

Project Structure

src/
โ”œโ”€โ”€ config/         # Configuration files
โ”œโ”€โ”€ controllers/    # Route controllers
โ”œโ”€โ”€ middleware/     # Express middleware
โ”œโ”€โ”€ models/         # Database models
โ”œโ”€โ”€ routes/         # Route definitions
โ”œโ”€โ”€ services/       # Business logic
โ”œโ”€โ”€ types/          # TypeScript types
โ”œโ”€โ”€ utils/          # Utility functions
โ””โ”€โ”€ index.ts        # App entry point

API Documentation

Swagger documentation is available at /api-docs when running the server.

Monitoring & Observability

Sentry

Error tracking and performance monitoring. Configure via SENTRY_DSN in .env.

OpenTelemetry

Distributed tracing enabled by default. Configure endpoint via OTEL_EXPORTER_OTLP_ENDPOINT.

Security

  • Helmet for security headers
  • CORS protection
  • Rate limiting
  • Request validation

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit using conventional commits
  4. Push to your branch
  5. Create a pull request

License

MIT

1.5.0

6 months ago

1.4.0

6 months ago

1.3.0

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.0

6 months ago