Skip to content

tomBold/SimpleHttpServer

🚀 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!

About

SimpleHttpServer

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors