Initial bootrap of application

- Creates scaffold for router and server
- Main program set up for environment, OS signal listener
- Makefile generic commands
This commit is contained in:
2021-06-17 17:06:21 -04:00
parent 61e39b6c2f
commit 336b21a835
14 changed files with 307 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
package main
import (
"github.com/joho/godotenv"
"github.com/kelseyhightower/envconfig"
)
type config struct {
Env string `default:"dev"`
APIPort int `default:3000`
LogLevel string `default:"debug"`
}
func load() (cfg config, err error) {
_ = godotenv.Load("cmd/api/.env")
err = envconfig.Process("", &cfg)
return
}