We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe0f244 commit ba1d359Copy full SHA for ba1d359
simple-gin-server/go.mod
@@ -0,0 +1,3 @@
1
+module example/ginserver
2
+
3
+go 1.20
simple-gin-server/server.go
@@ -0,0 +1,17 @@
+package main
+import (
4
+ "net/http"
5
6
+ "github.com/gin-gonic/gin"
7
+)
8
9
+func main() {
10
+ r := gin.Default()
11
+ r.GET("/ping", func(c *gin.Context) {
12
+ c.JSON(http.StatusOK, gin.H{
13
+ "message": "pong",
14
+ })
15
16
+ r.Run() // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
17
+}
simple-server-beego/go.mod
+module example/beeserver
simple-server-beego/server.go
@@ -0,0 +1,7 @@
+import "github.com/beego/beego/v2/server/web"
+ web.Run()
0 commit comments