# Iris Web Framework
[](https://travis-ci.org/kataras/iris) [](http://goreportcard.com/report/kataras/iris) [](https://kataras.rocket.chat/channel/iris) [](_examples/) [](https://github.com/kataras/iris/releases)
Iris是一个超快、简单并且高效的Go语言Web开发框架。
Iris功能很强大,使用又很简单,它将会是你下一个网站、API服务或者分布式应用基础框架的不二之选。
看看[别人是如何评价Iris](#support),同时欢迎各位[成为Iris星探](https://github.com/kataras/iris/stargazers),或者关注[Iris facebook主页](https://facebook.com/iris.framework)。
## Backers
感谢所有的支持者! [成为一个支持者](https://opencollective.com/iris#backer)
```sh
$ cat example.go
```
```go
package main
import "github.com/kataras/iris"
func main() {
app := iris.New()
// 从"./views"目录加载HTML模板
// 模板解析html后缀文件
// 此方式是用`html/template`标准包(Iris的模板引擎)
app.RegisterView(iris.HTML("./views", ".html"))
// HTTP方法: GET
// 路径: http://localhost:8080
app.Get("/", func(ctx iris.Context) {
// {{.message}} 和 "Hello world!" 字串绑定
ctx.ViewData("message", "Hello world!")
// 映射HTML模板文件路径 ./views/hello.html
ctx.View("hello.html")
})
// HTTP方法: GET
// 路径: http://localhost:8080/user/42
//
// 想在路径中用正则吗?
// 如下所示
// app.Get("/user/{id:string regexp(^[0-9]+$)}")
app.Get("/user/{id:long}", func(ctx iris.Context) {
userID, _ := ctx.Params().GetInt64("id")
ctx.Writef("User ID: %d", userID)
})
// 绑定端口并启动服务.
app.Run(iris.Addr(":8080"))
}
```
> 想要了解更多关于路径参数配置,戳[这里](_examples/routing/dynamic-path/main.go#L31)。
```html