initialize project structure with main, routing, and environment utilities

This commit is contained in:
2025-07-17 04:01:30 +08:00
parent 47db58b967
commit 70b653a88b
6 changed files with 79 additions and 0 deletions

15
internal/router/router.go Normal file
View File

@ -0,0 +1,15 @@
package router
import (
"github.com/cloudwego/hertz/pkg/app/server"
v1 "github.com/snowykami/neo-blog/internal/router/v1"
"github.com/snowykami/neo-blog/pkg/utils"
)
func init() {
h := server.New(
server.WithHostPorts(":"+utils.Getenv("PORT", "8888")),
server.WithMaxRequestBodySize(utils.GetenvAsInt("MAX_REQUEST_BODY_SIZE", 1048576000)), // 1000MiB
)
v1.RegisterRoutes()
}