Server automatically getting closed and facing 'ERR_STREAM_WRITE_AFTER_END' error along with data sending every time to client
问题 I am trying to get real-time data using Server-Sent Events from the Database Mysql and sending the value to the client Reactjs. Here is the code: server.js const mysql = require('mysql'); const app = require('express')() const fetch = require('node-fetch'); const con = mysql.createConnection({ host: 'localhost', user: 'root', password: 'root', database: 'databasetest', }); var increment = 0; app.get('/stream/:abc/:qwe', (request, response) => { console.log(`Request url: ${request.url}`); var