mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-05 16:56:22 +00:00
⚡ initialize project structure with main, routing, and environment utilities
This commit is contained in:
15
internal/router/router.go
Normal file
15
internal/router/router.go
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user