changeset 14:afc0de09231f

Fix path in tokenserver. Fix configuration in client. After reorganizing and merging the tokenserver with the current frontendcode were two defects: 1) The run:both command for yarn the toplevel path as origin. Now to start from the client folder, the command has to be relative to that. 2) The api prefix was doubled for the tokenserver route. The subpaths are '/' and '/token', not '/api/token'
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 20 Jun 2018 17:21:32 +0200
parents 88d0d60924cf
children 05d828374256
files client/package.json cmd/tokenserver/main.go
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/package.json	Wed Jun 20 17:02:06 2018 +0200
+++ b/client/package.json	Wed Jun 20 17:21:32 2018 +0200
@@ -3,7 +3,7 @@
   "version": "0.1.0",
   "private": true,
   "scripts": {
-    "run:both": "concurrently \"./cmd/tokenserver/tokenserver\" \"vue-cli-service serve\"",
+    "run:both": "concurrently \"../cmd/tokenserver/tokenserver\" \"vue-cli-service serve\"",
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",
     "lint": "vue-cli-service lint",
--- a/cmd/tokenserver/main.go	Wed Jun 20 17:02:06 2018 +0200
+++ b/cmd/tokenserver/main.go	Wed Jun 20 17:21:32 2018 +0200
@@ -45,7 +45,7 @@
 	p, _ := filepath.Abs("./web")
 	mux := http.NewServeMux()
 	mux.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir(p))))
-	mux.HandleFunc("/api/token", token)
+	mux.HandleFunc("/token", token)
 	api := http.NewServeMux()
 	api.Handle("/api/", http.StripPrefix("/api", mux))