Skip to content

[question] help for multiple port or multiple instance for http services  #346

@tsingson

Description

@tsingson

hi,

func main() {
    router := gin.Default()
    router.GET("/", func(c *gin.Context) {
       ....
    })
    router.Run(":8080") // data services 

    routerAdmin := gin.Default()
    routerAdmin.GET("/", func(c *gin.Context) {
        .....
    })
    routerAdmin.Run(":8090") // admin and monitor services 
}

but , only one port ( 8080 port ) working

yet, i know there some others solution to split different URL rout for two propose.
i just want to know single program can service tow port or not.

some one help for this??
thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions