Skip to content

Commit f98a0f7

Browse files
author
Ran Hassid
committed
make GOOGLE_APPLICATION_CREDENTIALS + GCLOUD_PROJECT optional
1 parent 2a8e9b9 commit f98a0f7

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

lib/index.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ const namePrefix = 'parse-server';
77

88
let emitter = new events.EventEmitter();
99

10-
if (!process.env.GOOGLE_APPLICATION_CREDENTIALS) {
11-
throw 'set GOOGLE_APPLICATION_CREDENTIALS variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)';
12-
}
10+
// if (!process.env.GOOGLE_APPLICATION_CREDENTIALS) {
11+
// throw 'set GOOGLE_APPLICATION_CREDENTIALS variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)';
12+
// }
13+
14+
// if (!process.env.GCLOUD_PROJECT) {
15+
// throw 'set GCLOUD_PROJECT variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)';
16+
// }
1317

14-
if (!process.env.GCLOUD_PROJECT) {
15-
throw 'set GCLOUD_PROJECT variable (see https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.8.0/guides/authentication)';
16-
}
1718

18-
/**
19-
* In order to use gcp pub/sub module we must provide 2 env. variables
20-
* GCP_PROJECT_ID - the project id on GCP
21-
* GCP_KEYFILE_PATH - path where the google service account key is located
22-
*/
2319
const pubsubClient = PubSub();
2420

2521
class Publisher {

0 commit comments

Comments
 (0)