In this tutorial we will create simple server using Iris Framework.
Some features of Iris framework:
- MVC Pattern
- Powerful Routing
- Logging
- gRPC support
- API Versioning
package main
import (
"github.com/kataras/iris/v12"
)
func main() {
app := iris.New()
app.Get("/", func(ctx iris.Context) {
ctx.JSON(iris.Map{"Hello": "Welcome"})
})
err := app.Listen(":8080")
if err != nil {
return
}
}
Run program using go run main.go
Open http://localhost:8080
into browser to see the result.
Top comments (0)