#109 move last url to new layout
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 7s
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 7s
This commit is contained in:
6
main.go
6
main.go
@@ -7,6 +7,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
@@ -14,6 +15,11 @@ import (
|
||||
func main() {
|
||||
log.Println("Starting server...")
|
||||
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Fatal("Error loading .env file")
|
||||
}
|
||||
|
||||
db, err := sql.Open("sqlite3", "./data.db")
|
||||
if err != nil {
|
||||
log.Fatal("Could not open Database data.db: ", err)
|
||||
|
||||
Reference in New Issue
Block a user