1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-01 03:58:38 -04:00

Move database configuration into config file

Also support mysql and postgres (at least in name, they haven't been
fully tested yet)
This commit is contained in:
2017-10-02 20:55:26 -04:00
parent 319b0b147d
commit 8ce3ef1bf5
4 changed files with 87 additions and 14 deletions

View File

@ -9,3 +9,17 @@ port = 8080
# Base directory for serving files out of. This should point to the root of the
# moneygo source directory
base-directory = src/github.com/aclindsa/moneygo/
# Type of database being used (sqlite3, mysql, postgres)
db-type = sqlite3
# 'Data Source Name' for the database being used. This is driver-specific. See
# the following examples and external resources for more information about
# configuring this for your particular database configuration:
#
# Sqlite example DSN: "file:moneygo.sqlite?cache=shared&mode=rwc"
# MySQL documentation: https://github.com/go-sql-driver/mysql/#dsn-data-source-name
# example DSN: "user:password@localhost/dbname"
# Postgres documentation: https://godoc.org/github.com/lib/pq
# example DSN: "postgres://user:password@localhost/dbname"
db-dsn = file:moneygo.sqlite?cache=shared&mode=rwc