Skip to content

Commit

Permalink
fix: Get clientId/clientSecret from env (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng1 authored and whDongRui committed Sep 28, 2018
1 parent b10cde4 commit 01482e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/middleware/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module.exports = async (ctx, next) => {
socketUrl = 'ws://' + socketUrl;
}

const clientId = config.clientId;
const clientSecret = config.clientSecret;
const clientId = process.env.clientId || config.clientId;
const clientSecret = process.env.clientSecret || config.clientSecret;
// url.resolve need first string starts with http
ctx.store.apiServer = url.resolve(serverUrl, apiVer);
ctx.store.socketUrl = socketUrl;
Expand Down

0 comments on commit 01482e7

Please sign in to comment.