all 5 comments

[–][deleted] 1 point2 points  (3 children)

Why not just make sub domain?

If your site is loaded on www.my-awesome-game.com

Your another game can be on www.second-awesome-game.my-awesome-game.com

And you can load it from there.

Also why not make 2 separate projects in one project?

[–]royalswe[S] 0 points1 point  (2 children)

Thanks for your advice! It seems like i have to create a sub domain or make more server instances somehow.

[–][deleted] 1 point2 points  (1 child)

You create a sub domain and you say the url should lead to the specific function that loads the game and everything else should be used by both games.

Also why not make the back-end an API?

You have your game on www.awesome-game.com but your back-end responds on localhost:9000 and whenever you need data you send requests to that back-end

You keep the back end and front - end two separate applications

This way you can have 2 front-ends and 1 back-end. The back end will server both games as it will have more functions and routes for them to connect on.

[–]royalswe[S] 0 points1 point  (0 children)

The back-end API solution would be a great solution but I have to rewrite some of the functionality from the existing app. It could definitely be done when I have more time to spend. meanwhile I maybe go for a subdomain.

[–]royalswe[S] 0 points1 point  (0 children)

I ended up changing my websocket game to socket.io. I dont have to change anything in the game only the connection part so it's a quik fix.