Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 578 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 578 Bytes

Package information

This is a highly edited project (in order to make it work with Iris), original project is located here.

Enables graceful shutdown for the Iris web framework.

Usage

package main

import (
    "github.com/iris-contrib/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)
}