Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

138
Visualizações
Using Javascript to tell Express server to serve a new webpage to multiple clients

In my web-based game, one player performs an action that forces all players to then be taken to a new page. I'm simply trying to send this request from the client Javascript to the Express server, which in turn serves the new webpage to all players.

How do I: a) send the request to the server in the first place? Use a fetch function to an app.get on the server? I suppose I can use an action on a button, but I'd rather have a function that triggers the server to get the new page. b) have the server code force all players to the new URL regardless of where they are in the game?

I'm using socket.io to communicate otherwise between the clients and the server.

Any help would be appreciated. Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda