halftheopposite / TOSIOS

The Open-Source IO Shooter is an open-source multiplayer game in the browser
MIT License
375 stars 78 forks source link

Cannot yarn start after installing dependencies #23

Closed pelillian closed 4 years ago

pelillian commented 4 years ago

Hi,

Tried to run the game using yarn and yarn start in an AWS instance. I changed the port to 3000, but as the image below shows, something is wrong with the client. (Everything works properly when using docker-compose up or yarn serve)

image Screen Shot 2020-05-22 at 3 38 12 PM
halftheopposite commented 4 years ago

Hi @pelillian,

Do you have any errors showing up? I never tried to launch the game with yarn start in a production environment.

When using yarn serve, the game's files are being served directly by the server itself on port 3001 (the game's files are copied over in the Dockerfile). When using yarn start you play the game on port 3000 and contact the server on port 3001 (they are both launched at the same time with concurrently). I do not know exactly how create-react-app behaves when launched on server (even less with concurrently binary).

What is your need to launch the game with yarn start on the server? This could give me some more context.

pelillian commented 4 years ago

Oh, in README.md under the development section it says to start the server with yarn start. I’m able to use serve but I wanted to use nodemon.

I guess I’ll just use serve in the future.