I noticed that when I reloaded my page on localhost:8080/about, routerForExpress would put the /about in the basename instead of the pathname. Which would mess up the routes on the browser. However when I changed:
app.use('/*', (req, res) => {
to
app.get('/*', (req, res) => {
as it is in the demo/server/index.js. It now works and the pathname is correct.
I noticed that when I reloaded my page on
localhost:8080/about
,routerForExpress
would put the/about
in thebasename
instead of thepathname
. Which would mess up the routes on the browser. However when I changed:to
as it is in the
demo/server/index.js
. It now works and thepathname
is correct.Will changing it to
app.get
cause any problems?