We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a6f824 commit e13a552Copy full SHA for e13a552
1 file changed
apps/frontend/server.go
@@ -17,8 +17,13 @@ func mkSlice(args ...interface{}) []interface{} {
17
}
18
19
func main() {
20
- if err := godotenv.Load("envfile"); err != nil {
21
- fmt.Println("Error loading .env file")
+ currentDir, err := os.Getwd()
+ if err != nil {
22
+ fmt.Println(err.Error())
23
+ return
24
+ }
25
+ if err := godotenv.Load(currentDir + "/envfile"); err != nil {
26
27
return
28
29
port := os.Getenv("PORT")
0 commit comments