A modern, well-tested TypeScript + Node.js REST API built with Express, featuring comprehensive testing, linting, and CI/CD pipeline.
- TypeScript - Full type safety and modern JavaScript features
- Comprehensive Testing - 9 passing tests with Jest and Supertest
- Code Quality - ESLint configuration for consistent code style
- CI/CD Ready - GitHub Actions workflow for automated testing
- Docker Support - Containerized deployment with Docker
- Security - Automated security audits and dependency checks
- Health Monitoring - Built-in health check endpoints
- RESTful API - Clean, intuitive API design
The project includes comprehensive test coverage:
# Run all tests npm test # Run tests with coverage npm run test:coverage # Run tests in watch mode npm run test:watch
Test Results:
- โ 9 tests passing
- โ 2 test suites
- โ User API tests
- โ Task API tests
# Build Docker image docker build -t simple-http-server . # Run with Docker Compose docker-compose up # Run in production mode docker-compose -f docker-compose.yml up -d
- Node.js 18.x or 20.x
- npm or yarn
src/
โโโ __tests__/ # Test files
โโโ controllers/ # Route controllers
โโโ middleware/ # Express middleware
โโโ routes/ # API routes
โโโ validation/ # Validation schemas
โโโ database.ts # In-memory database
โโโ server.ts # Express server setup
โโโ types.ts # TypeScript type definitions
โญ Star this repository if you found it helpful!