diff --git a/.gitignore b/.gitignore index 271b03bb1..1bf1521d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /sonic-server /iTunes*.xml /tmp +data/* vendor/*/ wiki TODO.md @@ -10,4 +11,3 @@ sonic.toml master.zip Jamstash-master storm.db -sonic.db diff --git a/Makefile b/Makefile index 834f36295..6957ed54c 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ GO_VERSION=1.13 NODE_VERSION=12.14.1 .PHONY: run -run: check_go_env +run: check_go_env data @reflex -d none -c reflex.conf .PHONY: dev -dev: check_env +dev: check_env data @goreman -f Procfile.dev -b 4533 start .PHONY: test @@ -46,3 +46,5 @@ check_node_env: @(hash node) || (echo "\nERROR: Node environment not setup properly!\n"; exit 1) @node --version | grep -q $(NODE_VERSION) || (echo "\nERROR: Please check your Node version. Should be $(NODE_VERSION)\n"; exit 1) +data: + mkdir data diff --git a/conf/configuration.go b/conf/configuration.go index 0f060a7e5..d8853d555 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -11,7 +11,7 @@ import ( type sonic struct { Port string `default:"4533"` MusicFolder string `default:"./iTunes1.xml"` - DbPath string `default:"./sonic.db"` + DbPath string `default:"./data/cloudsonic.db"` IgnoredArticles string `default:"The El La Los Las Le Les Os As O A"` IndexGroups string `default:"A B C D E F G H I J K L M N O P Q R S T U V W X-Z(XYZ) [Unknown]([)"` diff --git a/tests/sonic-test.toml b/tests/sonic-test.toml index aa1140840..1a12949d1 100644 --- a/tests/sonic-test.toml +++ b/tests/sonic-test.toml @@ -1,6 +1,6 @@ DevDisableAuthentication = false User = "deluan" Password = "wordpass" -DbPath = "/tmp/testDb" +DbPath = ":memory:" MusicFolder = "./tests/itunes-library.xml" DownsampleCommand = "ffmpeg -i %s -b:a %bk mp3 -"