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.
- 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+)
- RESTful API Services
- Web Application Development
- Microservices Architecture
- Enterprise Application Systems
- Getting Started - Quick start with httpsrv, learn basic usage
- FAQ - Common questions and troubleshooting
- 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
- log - Logging and monitoring
- Model, Relational Database - MySQL, PostgreSQL and other relational database integration
- Cache, Key-Value Database - Redis, SSDB and other NoSQL database integration
- Command Line Arguments - Command line parameter processing
- Read Introduction to understand framework features
- Follow Getting Started to create your first application
- Learn Controller and Router to master basic usage
- Refer to FAQ to solve problems you encounter
- Deep dive into Module and Service to understand architecture design
- Master Template for view rendering
- Integrate extension components: logging, database, cache
- Read source code and example projects
- Use modular architecture to organize code
- Follow naming conventions and agreements
- Use caching appropriately to improve performance
- Configure logging and monitoring systems
- Handle errors and exceptional situations properly
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.shThird-party libraries recommended by httpsrv:
- lynkdb/mysqlgo - MySQL client
- lynkdb/pgsqlgo - PostgreSQL client
- lynkdb/redisgo - Redis client
- lynkdb/ssdbgo - SSDB client
- hooto/hlog4g - Logging library
- hooto/hini4g - INI config file parsing
- hooto/hflag4g - Command line parameter processing
- hooto/hlang4g - Internationalization support
For more excellent Go libraries, please refer to: Go Third-party Libraries Directory
- GitHub Issues: https://github.com/hooto/httpsrv/issues
- Email: evorui at gmail dot com
httpsrv refers to the following projects in its architecture design and some code implementations. Thank you!
- Revel Framework https://github.com/revel/revel/
- Beego Framework https://github.com/astaxie/beego/
Licensed under the Apache License, Version 2.0