How to send server sent events on database update

I want to send SSE event only when there is a DB update API called.
How do I achieve this? What is the standard market practise to achieve this?

my SSE endpoint looks like this

app.get('/send-events', (req, res) => {
    const headers = {
        Connection: "keep-alive",
        "Content-Type": "text/event-stream",
        "Cache-Control": "no-cache",
    };
    res.writeHead(200, headers);

    const data = `data: ${new Date()}nn`;

    res.write(data);
});

i want to trigger the above api when another api is being called. Eg below

app.post('/update-db', (req, res) => {
    res.send('db-updated');

    //perform db update
    //send the latest data thru sse endpoint
});