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

276
Visualizações
how should I alter the launchsettings.json and frontend code to run this API that was originally running on localhost?

Last year my team made an online boardgame for school. The frontend is html/css and JS. The backend is an ASP .net Core app. The frontend is already set up on my server using NGINX. I wanted to host it on my portfolio site but the structure of the backend was provided to us by the teachers (i have gotten permission to host it) so it's not completely clear to me how exactly I should alter the code in order for the API to communicate properly with the frontend.The API was originally running on localhost.

What I do know is that I need an ARM Linux build to be able to run it on the server I have. I am assuming that in the launchsettings.json I need to alter the applicationUrl from localhost:5000 and localhost:5001 to something else and then match the code in the frontend to that address but i'm unsure where it should point to.

Should it be the domain name that points to my server? Or am I missing something?

This is literally my first question here so sorry if it's not in the proper format or unclear.

frontend request code and launchsettings.json screenshot

The code for the launchSettings.json for the API

{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:53518",
      "sslPort": 44307
    }
  },
  "profiles": {
    "Stratego.Api": {
      "commandName": "Project",
      "launchBrowser": false,
      "launchUrl": "swagger",
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

An example of a request in the frontend

get('https://localhost:5001/api/Game/' + localStorage.getItem("gameId") + '/board', headers)
        .then(response => {
            response.text().then(async function (message) {
                let parsed = JSON.parse(message);
                if (!containsBoard()) {
                    createBoard(parsed.squares, parsed.size);
                }
            });
        });
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