Skip to content

Latest commit

Β 

History

History
80 lines (62 loc) Β· 2.84 KB

File metadata and controls

80 lines (62 loc) Β· 2.84 KB

πŸš€ Simple HTTP Server

CI Tests Coverage Build Status TypeScript Node.js Express Jest ESLint License

A modern, well-tested TypeScript + Node.js REST API built with Express, featuring comprehensive testing, linting, and CI/CD pipeline.

✨ Features

  • 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

πŸ§ͺ Testing

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

🐳 Docker Support

# 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

πŸ”§ Development

Prerequisites

  • Node.js 18.x or 20.x
  • npm or yarn

Project Structure

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!