summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authortilpner2018-04-22 23:45:01 +0200
committertilpner2018-04-22 23:45:01 +0200
commitbacbe8a0ef513bad2122b6eeb47da325120cde3a (patch)
tree4e8815362897f82aa7e9dad2da9b9ccb120547f0 /modules
parentfbff17c34e0e87ffd3c678d29242e2563a4eb2d2 (diff)
downloadmeep-bacbe8a0ef513bad2122b6eeb47da325120cde3a.tar.gz
meep-bacbe8a0ef513bad2122b6eeb47da325120cde3a.tar.xz
meep-bacbe8a0ef513bad2122b6eeb47da325120cde3a.zip
Add default database setup
Diffstat (limited to 'modules')
-rw-r--r--modules/0-db.rkt13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/0-db.rkt b/modules/0-db.rkt
new file mode 100644
index 0000000..71e28ab
--- /dev/null
+++ b/modules/0-db.rkt
@@ -0,0 +1,13 @@
+#lang racket/base
+(require irc/db irc/storage
+ racket/match db)
+
+; this is fineā„¢, meep is expected to run as its own user
+(define data-dir (getenv "HOME"))
+
+(current-database
+ (sqlite3-connect #:database (build-path data-dir "meep.sqlite")
+ #:mode 'create))
+
+(db-init)
+(storage-init)