Browse Source

Add DB path configuration

master
Cassidy Dingenskirchen 10 months ago
parent
commit
355a672f8e
Signed by: StDingenskirchen GPG Key ID: 14FE9712CC42FE8B
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      .env.example
  2. +1
    -1
      src/Init.cr

+ 2
- 0
.env.example View File

@ -10,3 +10,5 @@ admin = 12345678910
#either 'prod' or 'dev'
runas = dev
dbfile = ./bampersand.db

+ 1
- 1
src/Init.cr View File

@ -14,7 +14,7 @@ Dotenv.load!
VERSION = `shards version`.chomp
STARTUP = Time.monotonic
DATABASE = DB.open "sqlite3://./bampersand.sqlite3"
DATABASE = DB.open "sqlite3:#{ENV["dbfile"]}"
SHUTDOWN = ->(s : Signal) {
LOG.fatal "Received #{s}"


Loading…
Cancel
Save