new port, env based config, build script

This commit is contained in:
2025-10-28 20:39:23 +01:00
parent 4a3fe068a3
commit a0b97a856a
8 changed files with 101 additions and 52 deletions

View File

@@ -6,8 +6,9 @@ import (
"fmt"
"mirror-sync/pkg/project"
_ "github.com/glebarez/go-sqlite"
"github.com/google/uuid"
_ "github.com/ncruces/go-sqlite3/driver"
_ "github.com/ncruces/go-sqlite3/embed"
)
type (
@@ -18,7 +19,7 @@ type (
func OpenDB(path string) (*Repository, error) {
// connect
db, err := sql.Open("sqlite", path)
db, err := sql.Open("sqlite3", "file:"+path)
if err != nil {
return nil, fmt.Errorf("failed to open database: %s", err)
}