Skip to content

Pusher not working in production on Vercel #48433

Answered by NotAndreh
Hamzi-SE asked this question in Help
Discussion options

You must be logged in to vote

Sure, i changed

pusher.trigger('my-channel', 'my-event', {
  "message": "hello world"
});

to

await pusher.trigger('my-channel', 'my-event', {
  "message": "hello world"
});

This way the serverless function does not end before pusher has sent the message

Replies: 4 comments 18 replies

Comment options

You must be logged in to vote
2 replies
@Hamzi-SE
Comment options

@Hamzi-SE
Comment options

Comment options

You must be logged in to vote
15 replies
@Hamzi-SE
Comment options

@NotAndreh
Comment options

Answer selected by Hamzi-SE
@Hamzi-SE
Comment options

@lightzane
Comment options

@Minna937
Comment options

@Msantanna10
Comment options

Comment options

You must be logged in to vote
1 reply
@manuelffernandez
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet