1 Star 0 Fork 0

崔俊 / iris_v1111

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.go 474 Bytes
一键复制 编辑 原始数据 按行查看 历史
崔俊 提交于 2024-03-11 14:05 . first commit
package main
import (
"net"
"github.com/kataras/iris"
)
func main() {
app := iris.New()
app.Get("/", func(ctx iris.Context) {
ctx.Writef("Hello from the server")
})
app.Get("/mypath", func(ctx iris.Context) {
ctx.Writef("Hello from %s", ctx.Path())
})
// create any custom tcp listener, unix sock file or tls tcp listener.
l, err := net.Listen("tcp4", ":8080")
if err != nil {
panic(err)
}
// use of the custom listener
app.Run(iris.Listener(l))
}
1
https://gitee.com/cuijun/iris_v1111.git
git@gitee.com:cuijun/iris_v1111.git
cuijun
iris_v1111
iris_v1111
1a5f2c173b4a

搜索帮助