Some simple router examples and practical examples with the gin framework and the go programming language.
this router send you a json data. To see routers JSON
- router.GET("/hello")
- router.GET("/hello/:name")
- router.GET("/data")
- router.GET("/form")
- router.POST("/form")
-
first install
go
programming language from this url. -
go to project directory and write in
terminal
:go run main.go
-
go to your browser and open this url: http://localhost:8080/
you can see urls in top