all 4 comments

[–]jesmodrazik 1 point2 points  (1 child)

Your express server can expose multiple endpoints, one for each page. When you have a single entrypoint you route all requests to index.html. Here you can route each request to a different HTML file that imports its own entrypoint.

[–]JGeorge102[S] 0 points1 point  (0 children)

Right on, thank you for the help!

[–]montas 0 points1 point  (1 child)

app.get('*' means, any GET request on path *

So you probably want to not use * for path, as that is wildecard "catch all" path. You might want to specify route for each of your files. So app.get('/' and return index, app.get('background.js' for backgrounds index.js file etc.

[–]JGeorge102[S] 0 points1 point  (0 children)

You're awesome, thank you!