diff --git a/.gitignore b/.gitignore index 1edfb07..40b3cee 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,5 @@ go.work .nfs* # Project-specific -oko-server \ No newline at end of file +oko-server +*.sqlite* \ No newline at end of file diff --git a/main.go b/main.go index 83d9dbe..b8acfa8 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,8 @@ func main() { tilepackFileArg := flag.String("tilepack", "", "File that will be sent to clients when they request a tile pack. Required.") apkFileArg := flag.String("apk", "", "APK file with the client app. If not specified, no APK will be available (404).") + flag.Parse() + s := server.New(*dbFileArg, *tilepackFileArg, *apkFileArg) sigs := make(chan os.Signal, 1) diff --git a/server/initdb.sql b/server/initdb.sql index d86dfb5..9c3ce5f 100644 --- a/server/initdb.sql +++ b/server/initdb.sql @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS users CASCADE; +DROP TABLE IF EXISTS users; CREATE TABLE IF NOT EXISTS users ( id integer PRIMARY KEY AUTOINCREMENT, name text NOT NULL UNIQUE