need colon

This commit is contained in:
Tommy Parnell
2021-12-28 11:46:05 -05:00
parent 6468c8c180
commit 737348c24b

View File

@@ -2,6 +2,7 @@ package main
import (
"os"
"strings"
"github.com/TerribleDev/fiber-test/people"
"github.com/gofiber/fiber/v2"
@@ -21,6 +22,9 @@ func main() {
if port == "" {
port = ":3000"
}
if !strings.HasPrefix(port, ":") {
port = ":" + port
}
app.Listen(port)
}