You will not be able to easily restart game loops and etc after the server restarts. The best you can do is persist the relevant state to the DB and load it when the room is created again.
Posts made by seiyria
RE: Just beginning, seek advice for setup on CentOS dedicated server
I wasn't having a ton of luck compiling uws. For me, I downgraded from node 9 to node 8.9.3 and uws started working for me again.
Land of the Rair
I've been working on a multiplayer rpg using colyseus. You can find it at https://rair.land. It's pretty old-style, and it currently looks like this:
I make use of colyseus by making each room correspond to a map in the world. That way, empty maps aren't loaded or taking any resources. Rooms with fewer players will still take fewer resources than a normal, populated one, since anything not near a player slows down significantly. The loot on the ground is persistent, same with boss timers, so you can't cheat the system.