{"id":19674735,"url":"https://github.com/cloudwego/hertz-examples","last_synced_at":"2025-04-08T08:12:15.948Z","repository":{"id":38324784,"uuid":"491501424","full_name":"cloudwego/hertz-examples","owner":"cloudwego","description":"Examples for Hertz.","archived":false,"fork":false,"pushed_at":"2025-03-31T09:37:45.000Z","size":7243,"stargazers_count":270,"open_issues_count":7,"forks_count":121,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-04-01T04:52:28.135Z","etag":null,"topics":["example","hertz","http"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudwego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-12T12:19:30.000Z","updated_at":"2025-03-31T09:37:49.000Z","dependencies_parsed_at":"2023-02-19T04:16:09.505Z","dependency_job_id":"e1eca41d-9ac7-49c3-88fa-65788482e88b","html_url":"https://github.com/cloudwego/hertz-examples","commit_stats":{"total_commits":95,"total_committers":37,"mean_commits":"2.5675675675675675","dds":0.8736842105263158,"last_synced_commit":"44f988d5fbd74340ac821c3083c9332f449fff55"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fhertz-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fhertz-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fhertz-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fhertz-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudwego","download_url":"https://codeload.github.com/cloudwego/hertz-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801170,"owners_count":20998339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example","hertz","http"],"created_at":"2024-11-11T17:19:36.184Z","updated_at":"2025-04-08T08:12:15.898Z","avatar_url":"https://github.com/cloudwego.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hertz Examples\n\nEnglish | [中文](README_CN.md)\n\n## How to run\n\nYou can enter the example for information about  \"How to run\"\n\n## Bizdemo\n\n- [bizdemo/hertz_gorm:](bizdemo/hertz_gorm) Example of using gorm in hertz server\n- [bizdemo/hertz_gorm_gen:](bizdemo/hertz_gorm_gen) Example of using gorm/gen \u0026 proto IDL in hertz server\n- [bizdemo/hertz_jwt:](bizdemo/hertz_jwt) Example of using jwt in hertz server\n- [bizdemo/hertz_session:](bizdemo/hertz_session) Example of using distributed session and csrf in hertz server\n- [bizdemo/hertz_swagger_gen:](bizdemo/hertz_swagger_gen) Example of using plugin to generate swagger service in hertz server\n- [bizdemo/tiktok_demo:](bizdemo/tiktok_demo) Example of simple tiktok in hertz server\n- [formulago:](https://github.com/chenghonour/formulago) Production-level backend management system framework implemented using hertz and ent\n- [gpress:](https://github.com/springrain/gpress) Production-grade cloud-native high-performance content platform using hertz and zorm\n\n## Server\n\n- [hello:](hello) Example of launching a hertz \"hello world\" application\n- [config:](config) Example of configuring hertz server\n- [protocol:](protocol) Example of using http1, tls and other protocols of hertz\n  - [HTTP1](https://github.com/cloudwego/hertz-examples/tree/main/protocol/http1) Example of hertz using HTTP1 protocol\n  - [TLS](https://github.com/cloudwego/hertz-examples/tree/main/protocol/tls) Example of hertz using TLS protocol\n  - [HTTP2](https://github.com/hertz-contrib/http2/tree/main/examples) Example of hertz using HTTP2 protocol\n  - [HTTP3](https://github.com/hertz-contrib/http3/tree/main/examples/quic-go) Example of hertz using HTTP3 protocol\n  - [Websocket](https://github.com/hertz-contrib/websocket/tree/main/examples) Example of hertz using Websocket protocol\n  - [SSE](https://github.com/hertz-contrib/sse/tree/main/examples) Example of hertz using SSE protocol\n- [middleware:](middleware) Example of using middleware of hertz\n  - [basicauth:](middleware/basicauth) Example of using BasicAuth middleware\n  - [cors:](middleware/CORS) Example of using CORS middleware\n  - [csrf:](middleware/csrf) Example of using csrf middleware\n  - [custom:](middleware/custom) Example of using custom middleware\n  - [pprof:](middleware/pprof) Example of using pprof middleware\n  - [requestid:](middleware/requestid) Example of using RequestID middleware\n  - [gzip:](middleware/gzip) Example of using Gzip middleware\n  - [loadbalance:](middleware/loadbalance) Example of using Loadbalance middleware\n  - [Recovery](https://www.cloudwego.io/docs/hertz/tutorials/basic-feature/middleware/recovery/) Example of using Recovery middleware\n  - [jwt](https://github.com/hertz-contrib/jwt/tree/main/example/basic) Example of using jwt middleware\n  - [i18n](https://github.com/hertz-contrib/i18n/tree/main/example) Example of using i18n middleware\n  - [session](https://github.com/hertz-contrib/sessions/tree/main/_example) Example of using session middleware\n  - [KeyAuth](https://github.com/hertz-contrib/keyauth/tree/main/example) Example of using KeyAuth middleware\n  - [Swagger](https://github.com/hertz-contrib/swagger/tree/main/example/basic) Example of using Swagger middleware\n  - [access log](https://github.com/hertz-contrib/logger/tree/main/accesslog/example) Example of using access log middleware\n  - [Secure](https://github.com/hertz-contrib/secure/tree/main/example/custom) Example of using Secure middleware\n  - [Sentry](https://github.com/hertz-contrib/hertzsentry) Example of using Sentry middleware\n  - [Casbin](https://github.com/hertz-contrib/casbin/tree/main/example) Example of using Casbin middleware\n  - [ETag](https://github.com/hertz-contrib/etag/tree/main/example) Example of using ETag middleware\n  - [Cache](https://github.com/hertz-contrib/cache/tree/main/example) Example of using Cache middleware\n  - [Paseto](https://github.com/hertz-contrib/paseto/tree/main/example) Example of using Paseto middleware\n- [binding:](binding) Example of parameter binding and validation\n- [parameters:](parameter) Example of getting query, form, cookie\n- [file:](file) Examples of file upload, file download, and static file services\n- [render:](render) Example of render body as json, html, protobuf\n- [redirect:](redirect)  Examples of redirects to internal/external URI\n- [streaming:](streaming) Example of streaming read/write for hertz server\n- [graceful_shutdown:](graceful_shutdown) Example of a graceful shutdown for hertz server\n- [unit_test:](unit_test) Example of writing unit tests using the interface provided by hertz without network transmission\n- [tracer:](tracer) Example of using Jaeger for link tracing\n- [monitoring:](monitoring) Example of using Prometheus for metrics monitoring\n- [multiple_service:](multiple_service) Example of using hertz with multiple services\n- [adaptor:](adaptor) Example of using adaptor to integrate hertz with package built for `http.Handler` interface , including a demonstration on using [jade](https://github.com/Joker/jade)\n  as template engine.\n- [sentinel:](sentinel) Example of using sentinel-golang in hertz\n- [reverseproxy:](reverseproxy/standard) Example of using reverseproxy in hertz server\n- [gzip:](middleware/gzip) Example of using gzip middleware in hertz server\n- [hlog:](hlog) Example of using hlog and its log extension\n- [trailer:](trailer) Example of read/write trailers for hertz server\n- [graphql-go:](graphql-go) Example of using graphql in hertz server\n\n\n## Client\n\n- [client/send_request:](client/send_request) Example of sending http requests using hertz client\n- [client/config:](client/config) Example of configuring hertz client\n- [protocol/tls:](protocol/tls) Example of sending a tls request using hertz client\n- [client/add_parameters:](client/add_parameters) Example of adding request parameters using the hertz client\n- [client/upload_file:](client/upload_file) Example of uploading a file using hertz client\n- [client/middleware:](client/middleware) Example of using hertz client middleware\n- [client/streaming_read:](client/streaming_read) Example of streaming read response using hertz client\n- [client/forward_proxy:](client/forward_proxy) Example of configuring a forward proxy using hertz client\n- [trailer:](trailer) Example of sending a request with trailer using hertz client\n\n## Hz\n\n- [hz/thrift:](hz/thrift) Example of using hz with thrift to generate server code\n- [hz/protobuf:](hz/protobuf) Example of using hz with protobuf to generate server code\n- [hz/hz_client:](hz/hz_client) Example of using hz to generate client code\n- [hz/template:](hz/template) Example of using hz custom templates to generate server code\n- [hz/plugin:](hz/plugin) Example of using hz to access third-party plugins\n- [hz/struct_reuse:](hz/struct_reuse) Example of using hz to use kitex_gen as hertz model\n\n## Note\n\nAll commands to execute the example should be executed under \"hertz-example\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fhertz-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudwego%2Fhertz-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fhertz-examples/lists"}