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 master examples. For the stable's version examples navigate through the v12 branch.
To read the Iris documentation please navigate to the wiki pages instead.
Examples are tested using Windows 10, Ubuntu 20.04 with Microsoft's Visual Studio Code and built using the Go 1.15.0.
- Serverless
- REST API for Apache Kafka
- URL Shortener
- Dropzone.js
- Caddy
- Database
- HTTP Server
- Configuration
- Routing
- Logging
- API Documentation
- Testing
- Recovery
- Profiling
- File Server
- 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
- Write to a custom
io.Writer
- Parse a Template from Text
- Blocks
- Blocks Embedded
- Pug:
Actions
- Pug:
Includes
- Pug Embedded`
- Ace
- Django
- Amber
- Amber Embedded
- 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
- Cookies
- Sessions
- Websocket
- Dependency Injection
- MVC
- Overview
- Repository and Service layers
- Hello world
- Basic
- Singleton
- Regexp
- Session Controller
- Authenticated Controller
- Versioned Controller
- Websocket Controller
- 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
- Bootstrapper
- Desktop Applications
- Middlewares (Community)
- Install the Go Programming Language, version 1.15+ from here.
- Download the examples and copy-paste them to your
$GOPATH/src/github.com/iris-contrib/examples
- Install Iris with
go get -u github.com/kataras/iris/[email protected]
To run an example, open a terminal session and execute:
$ cd $GOPATH/src/github.com/iris-contrib/examples/compression
$ go mod init
$ go run main.go
Do not forget to star or watch the Iris project.
https://github.com/iris-contrib/examples/issues