Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

273
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!