Closed zer0tonin closed 7 months ago
Using the production build, you cannot directly access subfolders and are greeted by a 404 error instead.
make run
/sub
http://localhost:8080/sub
In the production builds, the routes that are outside of /api are directed to serve static files: https://github.com/zer0tonin/Mikochi/blob/main/backend/main.go#L38 This code doesn't redirect random urls to our index.html which handles the frontend routing.
/api
index.html
Using the production build, you cannot directly access subfolders and are greeted by a 404 error instead.
Steps to reproduce
make run
)/sub
)http://localhost:8080/sub
Possible cause
In the production builds, the routes that are outside of
/api
are directed to serve static files: https://github.com/zer0tonin/Mikochi/blob/main/backend/main.go#L38 This code doesn't redirect random urls to ourindex.html
which handles the frontend routing.