Im chaning my application architecture and moving from server routing with spark to client routing with react. for that purpose I want my server to return my /build/ as a static folder, and let react-router handle the rest

my problem is that the returned URL is instead of

when react router joins to the party, it changes the url to, etc..

can I get rid of the /static/index.html in the url?

im currently using Spark.externalStaticFileLocation("public/build", "/static") in the server,

and then redirecting to index.html

Spark.get("/", (req, res) -> {
   return ""


0 Answers