Updated app and add script

This commit is contained in:
Sambo Chea 2021-09-27 18:08:36 +07:00
parent 697ca51854
commit 5987d1e892
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
4 changed files with 8 additions and 2 deletions

2
.gitignore vendored
View File

@ -13,3 +13,5 @@
# Dependency directories (remove the comment below to include it)
# vendor/
zengo

View File

@ -59,6 +59,7 @@ type App struct {
}
func (a *App) Run(config *config.Config) error {
a.Router = setupRouter()
r := setupRouter()
a.Router = r
return a.Router.Run(fmt.Sprintf("%s:%d", config.App.Addr, config.App.Port))
}

View File

@ -8,6 +8,6 @@ import (
func main() {
config := config.GetConfig()
app := &app.App{}
app := app.App{}
app.Run(config)
}

3
run Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
go run main.go