How to make page url like this: ‘…/games/firstGame’ where games is a parent page

I am trying to build a node.js following the heroku tutorial. I currently have this:

const express = require('express')
const path = require('path')
const PORT = process.env.PORT || 5000

express()
    .use(express.static(path.join(__dirname, 'public')))
    .set('views', path.join(__dirname, 'views'))
    .set('view engine', 'ejs')
    .get('/game', (req, res) => res.render('pages/game/game'))
    **.get('/game/firstGame', (req, res) => res.render('pages/game/game-firstGame'))**
    .listen(PORT, () => console.log(`Listening on ${ PORT }`))

However, this does not work because everytime I access this page with the window location directed to

https://.../game/firstGame

The heroku app will give me: Internal Server Error

Plus, the Firefox browser tells that I lack the file firstGame although I specified to render the file game-firstGame file

Go to Source
Author: Emma Wang

Error occured while trying to proxy to: localhost:3000/auth/google. http-proxy-middleware

Error occured while trying to proxy to: localhost:3000/auth/google. http-proxy-middleware

enter image description hereI have react-node-webpack app. I am implementing google oauth with passport.js. I need to use proxy server to make requests to google. this is my setup:

const { createProxyMiddleware } = require("http-proxy-middleware");

app.use(
  ["/api", "/auth/google"],
  createProxyMiddleware({
    target: "http://127.0.0.1:5000", //I used localhost instead but same issue
  })
);

when i start the server i see the message saying proxy is created.

       [HPM] Proxy created: /  -> http://127.0.0.1:5000

but when i visit the localhost:3000/auth/google i get this error

[HPM] Error occurred while trying to proxy request /api from localhost:3000 to http://127.0.0.1:5000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)

Go to Source
Author: Yilmaz