Browse Source

Merge pull request #481 from netroby/pr/graceful

Add document about graceful restart or stop
Manu Mtz.-Almeida 10 years ago
parent
commit
3368e6525b
1 changed files with 19 additions and 0 deletions
  1. 19 0
      README.md

+ 19 - 0
README.md

@@ -609,3 +609,22 @@ func main() {
 	s.ListenAndServe()
 }
 ```
+
+#### Graceful restart or stop
+
+Do you want to graceful restart or stop your web server?
+There be some ways.
+
+We can using fvbock/endless to replace the default ListenAndServe
+
+Refer the issue for more details: 
+
+https://github.com/gin-gonic/gin/issues/296
+
+```go
+router := gin.Default()
+router.GET("/", handler)
+// [...]
+endless.ListenAndServe(":4242", router)
+
+```