mirror of
https://github.com/kataras/iris.git
synced 2026-03-06 08:25:59 +00:00
Version 3.0.0-beta cleaned
This commit is contained in:
25
graceful/README.md
Normal file
25
graceful/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
## Package information
|
||||
|
||||
Enables graceful shutdown.
|
||||
|
||||
## Usage
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/graceful"
|
||||
"github.com/kataras/iris"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
api := iris.New()
|
||||
api.Get("/", func(c *iris.Context) {
|
||||
c.Write("Welcome to the home page!")
|
||||
})
|
||||
|
||||
graceful.Run(":3001", time.Duration(10)*time.Second, api)
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user