Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i use it with gin ? #63

Closed
LeaderBoy opened this issue Oct 14, 2020 · 5 comments
Closed

How can i use it with gin ? #63

LeaderBoy opened this issue Oct 14, 2020 · 5 comments
Labels

Comments

@LeaderBoy
Copy link

I can't find any documentation about using gin and overseer together.Below is my code, how can I use them together?

router := gin.Default()
router.Use(tlsHandler())
router.RunTLS(":8080", ".pem", ".key")
@jpillora
Copy link
Owner

Untested, though something like:

router := gin.Default()
router.Use(tlsHandler())
l := state.Listener()
l = tls.NewListener(l, &tls.Config{
  //use your cert/key
})
router.RunListener(l)

https://pkg.go.dev/github.com/gin-gonic/gin#Engine.RunListener

@LeaderBoy
Copy link
Author

@jpillora Thank you so much for your quick reply, I tested your code.
The following is the correct version

Untested, though something like:

router := gin.Default()
router.Use(tlsHandler())
l := state.Listener
l = tls.NewListener(l, &tls.Config{
  //use your cert/key
})
router.RunListener(l)

https://pkg.go.dev/github.com/gin-gonic/gin#Engine.RunListener

I would be even more grateful if there is a complete tutorial using the supervisor

@jpillora
Copy link
Owner

jpillora commented Oct 14, 2020 via email

@LeaderBoy
Copy link
Author

LeaderBoy commented Oct 14, 2020

@jpillora you say "Works with process managers (systemd, upstart, supervisor, etc)"
supervisord.org

@jpillora
Copy link
Owner

jpillora commented Oct 14, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants