社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
首先设置环境变量:
GO111MODULE=on
GOPROXY=https://goproxy.cn
新建一个go mod项目,
填写proxy:https://goproxy.cn
新建go文件
import “github.com/kataras/iris”
红色没关系,直接运行,系统自动帮忙下载需要的go包
代码:
package main
import "github.com/kataras/iris"
func main() {
app:=iris.New()
app.Get("/",func(ctx iris.Context){
ctx.WriteString("hello iris")
})
app.Run(iris.Addr(":7999"))
}
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!