Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

277
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda