I
I
Ilya2017-10-03 15:09:03
JavaScript
Ilya, 2017-10-03 15:09:03

How to keep the data up to date?

There is data that is constantly updated on the server and written to a file (every 100 ms), you need to transfer it to the client side, so far I did it through the setInterval function (which should check them at the same interval), checking this JSON file, But I'm not sure how correct this is to solve the problem.
Server side
59d37d3113427861445978.png
code: Client code:
59d37d3f37115977267996.png
I'm still green on this topic, so don't get mad if the question is simple.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeniy Kvasyuk, 2017-10-03
@EvgeniyKvasyuk

Look towards sockets

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question