Expressjs+lambda function : pusher is not triggered

hi all
i am playing a pusher functionality with node-cron to mimick a push notification using express, and deployed the app using netlify-lambda and http-serverless. the function built and deployed well and the res showing in the site:

but after the res.json() is the pusher.trigger() function, and it doesnt work since my other site doesnt receive any messages. it’s working in local

const pusher = new Pusher({

    message: "pusher+websocket is running and push earning data every min",
    author: "",

  // send earning, random 5-20
  const now =;
  const earning = parseInt(Math.random() * (20 - 5) + 5);

  // pusher send here..test.
  await pusher.trigger("my-channel", "my-event", {
    datetime: now,

do you guys have an idea why?

Netlify Functions don’t support websockets. You can try using Edge Functions.