need colon
This commit is contained in:
4
init.go
4
init.go
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/TerribleDev/fiber-test/people"
|
"github.com/TerribleDev/fiber-test/people"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
@@ -21,6 +22,9 @@ func main() {
|
|||||||
if port == "" {
|
if port == "" {
|
||||||
port = ":3000"
|
port = ":3000"
|
||||||
}
|
}
|
||||||
|
if !strings.HasPrefix(port, ":") {
|
||||||
|
port = ":" + port
|
||||||
|
}
|
||||||
|
|
||||||
app.Listen(port)
|
app.Listen(port)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user