fix some security issues

This commit is contained in:
wagslane
2023-06-06 13:33:22 -06:00
parent 307c73e1fb
commit 54f294659f
5 changed files with 10 additions and 7 deletions

View File

@@ -27,7 +27,10 @@ type apiConfig struct {
var staticFiles embed.FS
func main() {
godotenv.Load(".env")
err := godotenv.Load(".env")
if err != nil {
log.Fatalf("Error loading .env file: %v", err)
}
port := os.Getenv("PORT")
if port == "" {