This repository provides easy to understand code snippets on how to get started with web development with the Go programming language using the Iris web framework. This branch contains the latest iris main examples.
To read the Iris documentation please navigate to the documentation instead.
Examples are tested using Windows 11, Ubuntu 23.04 LTS, macOS 14 Sonoma with Microsoft's Visual Studio Code and built using the Go 1.22.2.
- Serverless
- REST API for Apache Kafka
- URL Shortener
- Dropzone.js
- Caddy
- Bootstrapper
- Project Structure 🔥
- Monitor
- Database
- GraphQL
- HTTP Server
- HOST:PORT
- Public Test Domain
- UNIX socket file
- TLS
- Letsencrypt (Automatic Certifications)
- Socket Sharding (SO_REUSEPORT)
- Graceful Shutdown
- Notify on shutdown
- Custom TCP Listener
- Custom HTTP Server
- Timeout
- HTTP Client
- Configuration
- Routing
- Custom Context HOT/NEW
- Party Controller NEW
- Overview
- Basic
- Custom HTTP Errors
- HTTP Wire Errors NEW
- Not Found - Intelligence
- Dynamic Path
- Middleware
- Per Route
- Globally
- Remove a Handler
- Share Values
- Handlers Execution Rule
- Route Register Rule
- Convert net/http Handlers
- Rewrite Middleware
- Route State
- Remove Route
- Reverse Routing
- Router Wrapper
- Custom Router
- Subdomains
- HTTP Method Override
- API Versioning
- Sitemap
- Logging
- API Documentation
- Testing
- Recovery
- Profiling
- File Server
- File Server
- HTTP/2 Push Targets
- HTTP/2 Push Targets (Embedded)
- HTTP/2 Push Targets (Gzipped Embedded)
- Favicon
- Basic
- Embedding Files Into App Executable File
- Embedding Files Into App Executable File (Bindata)
- Embedding Gzipped Files Into App Executable File (Bindata)
- Send Files (rate limiter included)
- Single Page Applications
- Upload File
- Upload Multiple Files
- WebDAV
- View
- Overview
- Layout
- Basic
- A simple Layout
- Layouts:
yield
andrender
tmpl funcs - The
urlpath
template func - The
url
template func - Inject Data Between Handlers
- Inject Engine Between Handlers
- Embedding Templates Into App Executable File
- Embedding Templates Into App Executable File (Bindata)
- Write to a custom
io.Writer
- Parse a Template from Text
- Blocks
- Blocks Embedded
- Pug:
Actions
- Pug:
Includes
- Pug Embedded`
- Ace
- Django
- Jet
- Jet Embedded
- Jet 'urlpath' tmpl func
- Jet Template Funcs from Struct
- Handlebars
- Third-Parties
- Request ID
- Request Rate Limit
- Request Referrer
- Webassembly
- Request Body
- Response Writer
- Compression
- Localization and Internationalization
- Authentication, Authorization & Bot Detection
- Recommended: Auth package and Single-Sign-On NEW (GO 1.18 Generics required)
- Basic Authentication
- CORS
- JSON Web Tokens
- JWT (community edition)
- OAUth2
- Manage Permissions
- Google reCAPTCHA
- hCaptcha
- Cookies
- Sessions
- Websocket
- Dependency Injection
- MVC
- Overview
- Repository and Service layers
- Hello world
- Basic
- Default request values
- Singleton
- Regexp
- Session Controller
- Authenticated Controller
- Versioned Controller
- Websocket Controller
- Websocket + Authentication (Single-Sign-On) NEW (GO 1.18 Generics required)
- Register Middleware
- gRPC
- gRPC Bidirectional Stream
- Login (Repository and Service layers)
- Login (Single Responsibility)
- Vue.js Todo App
- HTTP Error Handler
- Error Handler
- Handle errors using mvc.Result
- Handle errors using PreflightResult
- Handle errors by hijacking the result
- Desktop Applications
- Middlewares (Community)