mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-04 00:06:22 +00:00
16 lines
387 B
Go
16 lines
387 B
Go
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()
|
|
}
|