A simple example demonstrating the Okapi API Framework
Okapi is a modern, minimalist HTTP web framework for Go, inspired by FastAPI's elegance. Designed for simplicity, performance, and developer happiness, it helps you build fast, scalable, and well-documented APIs with minimal boilerplate.
Github: https://github.com/jkaninda/okapi
- Go installed
- Git installed
- Basic Okapi implementation example
- Okapi middlewares
- Okapi Route Definition
- Ready-to-run code structure
git clone https://github.com/jkaninda/okapi-example
cd okapi-example
go mod tidy
go run .
docker run --rm --name okapi-example -p 8080:8080 jkaninda/okapi-example
Visit http://localhost:8080
to see the response:
{"message": "Welcome to the Okapi Web Framework!"}
Visit http://localhost:8080/docs/
to see the documentation
.
├── main.go # Main application file
├── middlewares # Middlewares package
├── controllers # Controllers package
├── routes # Routes package
├── models # Models package
└── README.md # Project documentation
Okapi automatically generates Swagger UI for all routes:
MIT - Feel free to use and modify this example.