Answer the question
In order to leave comments, you need to log in
How to stream a change in a file in real time?
There is a file on the VPS, let for example access.log
, to which nginx writes. How to broadcast changes in this realtime text file? There are no issues with the realtime part - through web sockets. But what is the right way to watch for changes in a file and send these changes line by line? A line was added - the message was sent, and so on.
Answer the question
In order to leave comments, you need to log in
https://nodejs.org/docs/latest/api/fs.html#fs_fs_w...
https://nodejs.org/docs/latest/api/fs.html#fs_fs_w...
https://www. npmjs.com/package/chokidar
it is not clear without the code, perhaps the margin at the top of the block with About me needs to be reset, it is possible that the margin at the bottom of the hero block should be reset
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question