I have started to look into deploying a public instance of the platform. From what I can see, it seems like the token server URL was hardcoded into the JavaScript code:
The TOKEN_SERVER_URL value will be replaced on the fly by Webpack using the DefinePlugin. This would allow us to tweak the URL by using the appropriate value when calling npm, like this:
npm run build -- --env tokenServerUrl=http://foo:1234
I had to separate the copyfiles invocation into its own npm run package script, as otherwise I wasn't able to pass Webpack environment variables to the build.
I have started to look into deploying a public instance of the platform. From what I can see, it seems like the token server URL was hardcoded into the JavaScript code:
This pull request allows for customising the URL of the token handler, by using a Webpack
DefinePlugin
. The line can be changed to:The TOKEN_SERVER_URL value will be replaced on the fly by Webpack using the DefinePlugin. This would allow us to tweak the URL by using the appropriate value when calling
npm
, like this:I had to separate the
copyfiles
invocation into its ownnpm run package
script, as otherwise I wasn't able to pass Webpack environment variables to the build.