Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 4.14 KB

File metadata and controls

110 lines (75 loc) · 4.14 KB

httpsrv Introduction

httpsrv is a lightweight, high-performance, modular programming-oriented Golang HTTP framework, suitable for developing various internet-facing applications such as APIs and Web applications.

Key Features

  • Modular: Business code is organized and managed through modules, making enterprise-level complex application development more efficient
  • Lightweight: Pure and concise (core code 3000+), stable and reliable interfaces, easier for long-term application development
  • High Performance: Low memory footprint, stable and reliable high concurrency (2-core host QPS performance on mainstream cloud providers can reach 20000+)

Use Cases

  • RESTful API Services
  • Web Application Development
  • Microservices Architecture
  • Enterprise Application Systems

Documentation Navigation

Quick Start

  • Getting Started - Quick start with httpsrv, learn basic usage
  • FAQ - Common questions and troubleshooting

Core Components

  • Service - The outermost object instance of HTTP service
  • Config - Configuration parameters for HTTP service startup
  • Module - Core component for modular programming
  • Controller - Controller in Web MVC
  • Router - HTTP request routing rules
  • Template - View template in Web MVC

Extension Components

Learning Path

Beginners

  1. Read Introduction to understand framework features
  2. Follow Getting Started to create your first application
  3. Learn Controller and Router to master basic usage
  4. Refer to FAQ to solve problems you encounter

Advanced Developers

  1. Deep dive into Module and Service to understand architecture design
  2. Master Template for view rendering
  3. Integrate extension components: logging, database, cache
  4. Read source code and example projects

Best Practices

  1. Use modular architecture to organize code
  2. Follow naming conventions and agreements
  3. Use caching appropriately to improve performance
  4. Configure logging and monitoring systems
  5. Handle errors and exceptional situations properly

Example Project

For complete project examples, please refer to: https://github.com/hooto/httpsrv-demo

# Clone example project
git clone git@github.com:hooto/httpsrv-demo.git
cd httpsrv-demo

# Run example
./develop-run.sh

Ecosystem

Third-party libraries recommended by httpsrv:

Database

Utilities

For more excellent Go libraries, please refer to: Go Third-party Libraries Directory

Technical Support

References

httpsrv refers to the following projects in its architecture design and some code implementations. Thank you!

License

Licensed under the Apache License, Version 2.0