Welcome to huma-demo, a modern, simple, fast, and flexible micro-framework for building HTTP REST/RPC APIs in Golang. It is backed by OpenAPI 3 and JSON Schema, providing a robust and standardized approach to API development.
🏠 Homepage
✨ Demo
Before getting started with huma-demo, make sure you have the following tools installed:
- The Go Programming Language (version 1.20 or higher)
- Bun - A fast all-in-one JavaScript runtime
- OrbStack - Fast, light, simple Docker & Linux on macOS
- Hurl - Run and Test HTTP Requests
Make sure these tools are installed and properly configured on your system before proceeding.
To get started with huma-demo, simply run the following command:
make dev
This will start the development server and allow you to test your API locally.
To run the tests for huma-demo, you can use the following commands:
make test
make test-report # Run e2e tests with hurl and generate a report
make test-coverage
These commands will run the unit tests and generate a coverage report, respectively.
To view the available commands and their usage, you can use the following command:
make help
This will display a list of targets and their descriptions, helping you navigate the project.
Usage: make [target]
Targets:
dev Run the application in development mode
tidy Update project dependencies
test Run unit tests
test-coverage Run unit tests with coverage
test-report Run end-to-end tests and generate a report
view-test-report View the generated test report
generate-openapi Generate OpenAPI specification and add it to Fern
generate-fern Generate Fern
generate-go-sdk Generate Go SDK
help Show this help message
- Installation - Huma
- APIs in Go with Huma 2.0
- fern-api/fern: SDKs and Docs for your API
- A CLI for REST APIs - DEV Community
👤 Huynh Duc Dung
- Website: https://productsway.com/
- Twitter: @jellydn
- Github: @jellydn
Give a ⭐️ if this project helped you!