🍳 Recipes for Fiber
Welcome to the official Fiber cookbook!
Here you can find the most delicious recipes to cook delicious meals using our web framework.
🌽 Table of contents
- 404 Handler - Custom 404 error page handling.
- Advanced Caching - Demonstrates advanced caching strategies in Fiber v3 including deterministic key generation, tenant isolation, client bypass, and tag-based invalidation.
- Air Live Reloading - Live reloading for Go applications.
- Angular SSR - Serving Angular with Server-Side Rendering (SSR) using Fiber v3 and reverse proxy.
- Asynq - Enqueue background jobs from Fiber and process them with an Asynq worker.
- Auth + JWT - Simple JWT authentication.
- Autocert - Automatic TLS certificate management.
- AWS Elastic Beanstalk - Deploying to AWS Elastic Beanstalk.
- AWS SAM Container - Containerized serverless applications with AWS SAM.
- AWS SES Email Sender - AWS SES-based Golang email delivery service. Provides email dispatch processing, status tracking, scheduled sending, and result analysis capabilities.
- Bootstrap - A starter project with Fiber, GORM, a validator and environment configuration.
- Clean Architecture - Implementing clean architecture in Go.
- Cloud Run - Deploying to Google Cloud Run.
- Cloudflare Container Workers with Go Fiber - Run a Go Fiber v3 app in a Cloudflare Container Worker with a Worker proxy.
- CSRF + Session - Cross-Site Request Forgery (CSRF) protection with session management.
- Docker + Nginx - Load balancing with Docker and Nginx.
- Dummy JSON Proxy - Proxying dummy JSON data.
- Dynamic Route Management - Managing dynamic route registration via an in-memory registry and a catch-all dispatcher in Fiber v3.
- Early Hints (HTTP 103) - Demonstrating HTTP 103 Early Hints in Fiber v3 to preload critical assets before delivering the final response.
- Email Verification Service - Email verification service with code generation and validation
- Entgo ORM (MySQL) - Using Entgo ORM with MySQL
- Envoy External Authorization - External authorization with Envoy.
- File Server - Serving static files.
- Firebase Authentication - Firebase authentication integration.
- Firebase Functions - Using Firebase Functions.
- Form Data - Parsing application/x-www-form-urlencoded bodies into structs, slices and maps.
- GeoIP + MaxMind - Geolocation with GeoIP and MaxMind databases.
- GORM - Using GORM with SQLite, MySQL or PostgreSQL.
- GraphQL Subscriptions with gqlgen - Schema-first GraphQL with gqlgen, with queries and mutations over HTTP and subscriptions over WebSocket.
- Graceful shutdown - Graceful shutdown of applications.
- GraphQL - Setting up a GraphQL server.
- gRPC - Using Fiber as a client to a gRPC server.
- Hello World - A simple "Hello, World!" application.
- Hexagonal Architecture - A Hexagonal Software Architecture in Golang and MongoDB.
- HTTPS with PKCS12 TLS - Setting up an HTTPS server with PKCS12 TLS certificates.
- HTTPS with TLS - Setting up an HTTPS server with self-signed TLS certificates.
- I18n - Internationalization support.
- JWT - Using JSON Web Tokens (JWT) for authentication.
- Kubernetes - Deploying applications to Kubernetes.
- Todo App + Auth + GORM + Testcontainers - A Todo application with authentication using GORM and Postgres.
- Memgraph - Using Memgraph.
- MinIO - A simple application for uploading and downloading files from MinIO.
- MongoDB - Connecting to a MongoDB database.
- Monitoring with Apitally - A simple REST API with monitoring and request logging using Apitally.
- Multiple Ports - Running an application on multiple ports.
- MySQL + PostgreSQL - Connecting to MySQL or PostgreSQL with database/sql.
- Neo4j - Connecting to a Neo4j database.
- OAuth2 - Implementing GitHub OAuth2 authentication with GoFiber, with notes for Google.
- OpenAPI - Generate OpenAPI 3 documentation and JSON schema for your application.
- Optional Parameter - Handling optional parameters.
- Parsley - Using Parsley for dependency injection in an application.
- Prefork - Running an application in prefork mode.
- Prometheus Monitoring - Demonstrates how to instrument Fiber v3 applications and export Prometheus metrics.
- Proxy Resilience - Implementing retry and circuit breaker patterns in proxy middleware.
- RabbitMQ - Using RabbitMQ with Fiber to publish messages to a queue.
- Recover Middleware - Recover middleware for error handling.
- RSS Feed - Generating an RSS feed.
- Custom Error Handling with Sentry - Demonstrates custom error handling and panic recovery in Fiber v3 integrated with Sentry.
- Server Timing - Adding Server Timing headers to an application.
- Sessions + SQLite3 - Using SQLite3 as a storage engine for user sessions.
- Socketio - A chatroom application using Socket.IO.
- Single Page Application (SPA) - Serving a Single Page Application (SPA) with Fiber, including the index.html fallback for client-side routes.
- Sqlboiler - Using Sqlboiler ORM.
- Sqlc - Using Sqlc to generate Go code from SQL queries.
- Server-Sent Events - Implementing Server-Sent Events in an application.
- Stream Request Body - Streaming request bodies.
- Sveltekit Embed - A full-stack application built using Sveltekit and Tailwind CSS.
- Swagger - Generate Swagger documentation for your application.
- Tableflip Example - Use tableflip for graceful upgrades in a Go application.
- Template - Setting up a Go application with template rendering.
- Template Asset Bundling - Setting up a Go application with template rendering and asset bundling.
- Todo App + Auth + GORM - A Todo application with authentication using GORM.
- Unit Testing - Writing unit tests for a Go Fiber application.
- File Upload - Handling file uploads in a Go application.
- Validation - Input validation using go-playground/validator.
- Vercel - Deploy a Go application to Vercel.
- Viper Configuration - Manage layered application configuration in Fiber using Viper with YAML and environment variables.
- WebSocket - Real-time communication application using WebSockets.
- WebSocket Shared State - Demonstrates thread-safe shared state management and real-time broadcasting across multiple WebSocket connections and HTTP handlers in Fiber v3.
👩🍳 Have a delicious recipe?
If you have found an amazing recipe for Fiber — share it with others! We are ready to accept your PR and add your recipe to the cookbook (both on website and this repository).