Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
e2ae8f41e9
|
|||
|
068625aaad
|
@@ -0,0 +1,5 @@
|
|||||||
|
# HTTP Settings
|
||||||
|
PORT=8080
|
||||||
|
|
||||||
|
# App Settings
|
||||||
|
STORAGE_PATH=files
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
module drogobox.com/drogobox
|
module drogobox.com/drogobox
|
||||||
|
|
||||||
go 1.25.9
|
go 1.25.9
|
||||||
|
|
||||||
|
require github.com/joho/godotenv v1.5.1 // indirect
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||||
|
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
+18
-2
@@ -1,7 +1,23 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/joho/godotenv"
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("Greetings Program")
|
err := godotenv.Load()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal("Error loading .env file")
|
||||||
|
}
|
||||||
|
|
||||||
|
port := os.Getenv("PORT")
|
||||||
|
|
||||||
|
storage_path := os.Getenv("STORAGE_PATH")
|
||||||
|
|
||||||
|
fmt.Printf("in the future I will listen on port: %s\n", port)
|
||||||
|
fmt.Printf("Reading files from: %s\n", storage_path)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user