In the frontend, to fetch the games using this list API, we will set up a fetch method in api-game.js.
mern-vrgame/client/game/api-game.js:
const list = () => { return fetch('/api/games', { method: 'GET', }).then(response => { return response.json() }).catch((err) => console.log(err)) }