Skip to content

Commit

Permalink
docs(sandbox): ading docs for pubnub config
Browse files Browse the repository at this point in the history
  • Loading branch information
yeshamavani committed Sep 2, 2021
1 parent f7cbe48 commit 9d14f2a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
5 changes: 5 additions & 0 deletions sandbox/pubnub-example/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ JWT_SECRET=
JWT_ISSUER=
PUBNUB_SUBSCRIBE_KEY=
PUBNUB_PUBLISH_KEY=
UUID=
APP_ENV=
APP_BUNDLE_ID=
SSL=
LOG_VERBOSITY=
20 changes: 15 additions & 5 deletions sandbox/pubnub-example/src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,24 @@ export class PubnubExampleApplication extends BootMixin(
useCustomSequence: false,
});

/*
subscribeKey: String - key used for subscribing to a channel (mandatory)
publishKey: String - key used for publishing messages to a channel (mandatory)
ssl: Boolean - if true request will be over HTTPS (optional)
logVerbosity: Boolean - log the HTTP request (optional)
uuid: String - set a unique uuid to identify a user or a device that connects to pubnub (mandatory)
apns2Env: String - the environment on which its running (optional)
apns2BundleId: String - the bundle id (optional)
*/

this.bind(PubnubBindings.Config).to({
subscribeKey: process.env.PUBNUB_SUBSCRIBE_KEY,
publishKey: process.env.PUBNUB_PUBLISH_KEY,
ssl: true,
logVerbosity: true,
uuid: 'my-app',
apns2Env: 'dev',
apns2BundleId: 'com.app.myapp',
ssl: process.env.SSL,
logVerbosity: process.env.LOG_VERBOSITY,
uuid: process.env.UUID,
apns2Env: process.env.APP_ENV,
apns2BundleId: process.env.APP_BUNDLE_ID,
});

this.bind(SNSBindings.Config).to({});
Expand Down

0 comments on commit 9d14f2a

Please sign in to comment.