O
O
Oversec2017-04-16 23:51:25
Node.js
Oversec, 2017-04-16 23:51:25

How to make the application work without stopping?

I am creating a game. The server part is on express, the client part is on React, the server works in the form of api. Since the game has rounds, it is necessary that the rounds go constantly on the server, and when connecting, people receive the necessary data (round time, etc.). At the same time, the game should continue even if there are no users, the server must always calculate everything and give the user data if he enters. It seems that the task is not difficult, but I fell into a stupor, because if there is no one on the client, then the game is therefore worth it. I use pm2 on the server to run processes

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
emp1re, 2017-04-17
@Oversec

What exactly should be if there are no users? At the time of the appearance of those, you need to implement the logic.
In general, of course socket, you can simulate a user and give your logic to everyone or to rooms.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question