add .env.example file with configuration settings, refactor environment variable access methods

This commit is contained in:
2025-07-22 09:31:58 +08:00
parent 00c28fea9c
commit 08872ea015
7 changed files with 56 additions and 17 deletions

View File

@ -23,7 +23,7 @@ func Run() error {
func init() {
h = server.New(
server.WithHostPorts(":"+utils.Env.Get("PORT", "8888")),
server.WithMaxRequestBodySize(utils.Env.GetenvAsInt("MAX_REQUEST_BODY_SIZE", 1048576000)), // 1000MiB
server.WithMaxRequestBodySize(utils.Env.GetAsInt("MAX_REQUEST_BODY_SIZE", 1048576000)), // 1000MiB
)
apiv1.RegisterRoutes(h)
}