Skip to content

Commit a7eb904

Browse files
committed
Merge branch 'release/v1.8.0'
2 parents b29c4be + 5a5d4e3 commit a7eb904

File tree

5 files changed

+19
-22
lines changed

5 files changed

+19
-22
lines changed

.env.TEMPLATE

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
DEV_MODE=1
2-
DEV_HOST_PATH='http://localhost'
3-
DEV_PORT=8081
4-
DEV_CONNECTOR_HOST='http://localhost'
1+
HOST_NAME='localhost'
2+
PORT=3000
53

64

75
## OAUTH 2 secrets

auth_proxy/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,5 @@ app.get('/refresh_token', function (req, res) {
206206
});
207207

208208
app.listen(app.get('port'), () => {
209-
LOG(`Listening on ${app.get('port')}`);
209+
LOG(`Listening on ${CONFIG.HOST_NAME}:${app.get('port')}`);
210210
});

auth_proxy/config.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
*/
77
// this will attempt to load /.env to emulate process.env stored vars and avoid hardcode them
88
import dotenv from 'dotenv';
9-
10-
import { hostname } from 'os';
119
import { env } from 'process';
1210

13-
const PORT = 3000;
14-
const HOST_NAME = hostname();
11+
dotenv.config();
12+
13+
const PORT = env.PORT || 3000;
14+
const HOST_NAME = env.HOST_NAME || 'localhost';
1515
const REDIRECT_URI = 'http://' + HOST_NAME + ':' + PORT + '/callback';
1616
const API_URI = 'https://accounts.spotify.com';
1717

18-
dotenv.config();
19-
2018
export default {
21-
'PORT': PORT,
19+
PORT,
20+
HOST_NAME,
2221
// @see http://tableau.github.io/webdataconnector/docs/api_ref.html#webdataconnectorapi.authpurposeenum
2322
// DESKTOP SECRETS
2423
'EPHEMERAL': {

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"author": "Javier Valderrama",
33
"name": "advanced_wdc_step_by_step",
44
"description": "Spotify Web Data Connector for Tableau",
5-
"version": "1.7.2",
5+
"version": "1.8.0",
66
"dependencies": {
77
"jquery": "~3.1.0",
88
"q": "~1.5.1"
99
},
1010
"scripts": {
1111
"prestart": "npm run build",
1212
"start": "npx babel-node ./auth_proxy/app.js",
13-
"build": "webpack --mode=production",
13+
"build": "webpack --mode=development",
1414
"build-w": "webpack --mode=development --watch",
1515
"build-dev": "webpack --mode=development",
1616
"lint": "eslint src/**/*.js auth_proxy/**/*.js",
@@ -26,7 +26,7 @@
2626
"license": "Apache-2.0 https://github.com/lbrendanl/SpotifyWDC/raw/master/LICENSE",
2727
"devDependencies": {
2828
"@jaxolotl/eslint-config-wdc-es6": "~1.2.0",
29-
"@jaxolotl/wdclib": "~2.4.0-beta.1.2.1",
29+
"@jaxolotl/wdclib": "~2.4.0-beta.1.3",
3030
"babel-cli": "~6.26.0",
3131
"babel-core": "~6.26.3",
3232
"babel-eslint": "~9.0.0",

0 commit comments

Comments
 (0)