Last active
October 20, 2021 10:42
-
-
Save velotiotech/21d9869277e05c57044ee4c55884f080 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const endpoint = process.env.IS_OFFLINE ? 'http://localhost:3001' : process.env.PUBLISH_ENDPOINT; | |
console.log('publish endpoint', endpoint); | |
const gatewayClient = new ApiGatewayManagementApi({ | |
apiVersion: '2018-11-29', | |
credentials: config, | |
endpoint, | |
}); | |
return gatewayClient | |
.postToConnection({ | |
ConnectionId: this.connectionId, | |
Data: JSON.stringify(message), | |
}) | |
.promise(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment