mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-24 05:03:40 +00:00
commit
40c768698f
5
app.go
5
app.go
@ -450,6 +450,11 @@ func (app *App) Listener(ln net.Listener, tlsconfig ...*tls.Config) error {
|
|||||||
|
|
||||||
// Listen serves HTTP requests from the given addr or port.
|
// Listen serves HTTP requests from the given addr or port.
|
||||||
// You can pass an optional *tls.Config to enable TLS.
|
// You can pass an optional *tls.Config to enable TLS.
|
||||||
|
//
|
||||||
|
// - app.Listen(8080)
|
||||||
|
// - app.Listen("8080")
|
||||||
|
// - app.Listen(":8080")
|
||||||
|
// - app.Listen("127.0.0.1:8080")
|
||||||
func (app *App) Listen(address interface{}, tlsconfig ...*tls.Config) error {
|
func (app *App) Listen(address interface{}, tlsconfig ...*tls.Config) error {
|
||||||
// Convert address to string
|
// Convert address to string
|
||||||
addr, ok := address.(string)
|
addr, ok := address.(string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user