Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Last active October 20, 2021 10:42
Embed
What would you like to do?
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