This commit is contained in:
parent
b44adc4f5d
commit
1015670704
1 changed files with 4 additions and 5 deletions
9
main.go
9
main.go
|
@ -8,7 +8,6 @@ import (
|
|||
"time"
|
||||
|
||||
mqtt "github.com/eclipse/paho.mqtt.golang"
|
||||
"github.com/joho/godotenv"
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
|
@ -41,10 +40,10 @@ var db *sql.DB
|
|||
|
||||
func main() {
|
||||
// Load environment variables from .env file if it exists
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Println("Error loading .env file:", err)
|
||||
}
|
||||
// err := godotenv.Load()
|
||||
// if err != nil {
|
||||
// log.Println("Error loading .env file:", err)
|
||||
// }
|
||||
|
||||
// Connect to PostgreSQL
|
||||
pgConnStr := os.Getenv("PG_DB")
|
||||
|
|
Loading…
Reference in a new issue