We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abbbfcc commit 883599dCopy full SHA for 883599d
1 file changed
lib/storage-extra.js
@@ -19,6 +19,13 @@ if (process.env.LEANCLOUD_API_SERVER) {
19
AV.setServerURLs(process.env.LEANCLOUD_API_SERVER);
20
}
21
22
+if (AV.version && !AV.version.match(/^[0123]\./)) {
23
+ AV._config.applicationId = process.env.LEANCLOUD_APP_ID;
24
+ AV._config.applicationKey = process.env.LEANCLOUD_APP_KEY;
25
+ AV._config.masterKey = process.env.LEANCLOUD_APP_MASTER_KEY;
26
+ AV._config.hookKey = process.env.LEANCLOUD_APP_HOOK_KEY;
27
+}
28
+
29
AV._sharedConfig.userAgent = 'AVOS Cloud Code Node ' + require('../package').version;
30
AV.Cloud.__prod = process.env.NODE_ENV === 'production' ? 1 : 0;
31
AV.setProduction(AV.Cloud.__prod);
0 commit comments