add environment variable support

This commit is contained in:
Nik Graf 2017-06-20 15:22:46 +02:00
parent c44bba48e0
commit 62ab8e09ea
No known key found for this signature in database
GPG Key ID: 7A97512F916175F1

View File

@ -81,6 +81,10 @@ class Platform {
}
getAuthToken() {
if (process.env.SERVERLESS_PLATFORM_AUTH_TOKEN) {
return process.env.SERVERLESS_PLATFORM_AUTH_TOKEN;
}
const userConfig = configUtils.getConfig();
const currentId = userConfig.userId;
const globalConfig = configUtils.getGlobalConfig();