React Router + Express with Webpack? Cannot get these two to work together

I am working on the Voting App back-end project. I have my Express server which has various api endpoints such as /api/createPoll, /api/viewPoll/:poll_id, /api/create_user, as well as serve static files (bundled .js file) containing the UI in the /dist folder.

I have my React components (using React Router) call these API endpoints, but in my view if I go to something like http://localhost:8080/create_user, it says it cannot find that route.

I believe it to be a conflict, since my webserver is technically an ExpressJS server, the routes it uses are the ExpressJS routes, and ignores the React Router routes.

Is there any way I can get React Router UI routes to work well with my ExpressJS server routes? I know I could put my ExpressJS server on Heroku and run the view on something like GitHub pages, but I would prefer to keep them both together on the same platform.

I use webpack to bundle the js, then use gulp-nodemon to load the ExpressJS server.

For anyone having problems with this who ends up here, you need to set the default path on Express to send the ReactJS index.html file. It will look like this:

app.get("*", (req, res) => {
    res.sendFile(path.join(__dirname, "path/to/index.html"));

The path to index.html is usually on the public or dist folder.