Skip to content

🎧 Your Personal Streaming Service

Download Jamstash in `make setup`

Deluan907c310c019c
diff --git a/.gitignore b/.gitignore
index 26981051b..aa592f7f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
/sonic-server
/iTunes*.xml
-static/Jamstash
devDb
/tmp
vendor/*/
@@ -8,4 +7,6 @@ wiki
TODO.md
var
Artwork
-sonic.toml
\ No newline at end of file
+sonic.toml
+master.zip
+Jamstash-master
diff --git a/Makefile b/Makefile
index 2fc366737..e689b1487 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ clean:
rm -f ${BINARY}
.PHONY: setup
-setup:
+setup: jamstash
@which reflex || (echo "Installing Reflex" && GO111MODULE=off go get -u github.com/cespare/reflex)
@which goconvey || (echo "Installing GoConvey" && GO111MODULE=off go get -u github.com/smartystreets/goconvey)
@which wire || (echo "Installing Wire" && GO111MODULE=off go get -u go get github.com/google/wire/cmd/wire)
@@ -16,7 +16,7 @@ setup:
.PHONY: run
run:
- @reflex -s -r "(\.go$$|sonic.toml)" -- go run .
+ @reflex -s -r "(\.go$$|sonic.toml)" -R "Jamstash-master" -- go run .
.PHONY: test
test:
@@ -30,3 +30,8 @@ convey:
cloc:
# cloc can be installed using brew
cloc --exclude-dir=devDb,.idea,.vscode,wiki,static --exclude-ext=iml,xml .
+
+jamstash:
+ wget -N https://github.com/tsquillario/Jamstash/archive/master.zip
+ unzip -o master.zip
+ rm master.zip
diff --git a/app.go b/app.go
index ff720fad7..eaa38d8c0 100644
--- a/app.go
+++ b/app.go
@@ -48,11 +48,11 @@ func (a *App) initRoutes() {
r.Use(middleware.Heartbeat("/ping"))
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, "/static/Jamstash", 302)
+ http.Redirect(w, r, "/Jamstash", 302)
})
workDir, _ := os.Getwd()
- filesDir := filepath.Join(workDir, "static")
- FileServer(r, "/static", http.Dir(filesDir))
+ filesDir := filepath.Join(workDir, "Jamstash-master/dist")
+ FileServer(r, "/Jamstash", http.Dir(filesDir))
a.router = r
}