Proxy server for react app

Hello, i have a react app that needs proxyServer.js to get all the api keys and stuff cause of cors. I can run it locally using nodemon, but how could i run it in netlify publicly? I’m new to web development so all of this is new to me.
Here is my server.js code if this helps with enything:

var  express = require('express');
var cors = require('cors');
const axios = require('axios');
const EUROPE = "https://europe.api.riotgames.com";
const EUNE = "https://eun1.api.riotgames.com";

var app = express();

app.use(cors());

const API_KEY = "riotdevapikeyhere";

function getPlayerPUUID(playerName){
    return axios.get(EUNE +'/lol/summoner/v4/summoners/by-name/' + playerName + "?api_key=" + API_KEY)
        .then(response => {
            return response.data.puuid
        })
        .catch(err => err);
}
//Get viimased 10 mängu
app.get('/past10Games', async (req, res) => {
    const playerName = req.query.username;
    const PUUID = await getPlayerPUUID(playerName);
    const API_CALL = EUROPE + "/lol/match/v5/matches/by-puuid/" + PUUID + "/ids" + "?api_key=" + API_KEY
    
    const gameIDs = await axios.get(API_CALL)
        .then(response => response.data )
        .catch(err => err)
    console.log("playeri nimi = " + playerName );
    console.log("gameids = " + gameIDs);

    
    var matchDataArray = [];
    for(var i = 0; i < gameIDs.length -10; i++){
      const matchID = gameIDs[i];
      const matchData = await axios.get(EUROPE + "/lol/match/v5/matches/" + matchID + "?api_key=" + API_KEY)
          .then(response => response.data)
          .catch(err => err)
      matchDataArray.push(matchData);
    }

    
    res.json(matchDataArray);

})

app.listen(4000, function (){// localhost:4000
    console.log('Server started on port 4000');
}); ```

@TrinityTF You could investigate converting it to run via a Function: