Opening a Room link directly returns 500 in production #311
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amaurycoudr/chess-project#311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
On the deployed site,
GET /serves the front, but every client route opened directly returns 500:So a Player who opens a shared Room link can't join, and a reload inside a Room fails too.
Expected
Any client route the API doesn't handle (not
/rpc) answers 200 with the front'sindex.html, asapps/api/test/front.integration.test.tsasserts in-process.What is known
FRONT_DIST_DIR=apps/front/dist node apps/api/dist/main.js. The relative path makes the static fallback throwTypeError: path must be absolute or specify root to res.sendFile(@nestjs/serve-static 12 on Express 5).FRONT_DIST_DIR, the same routes give 404 instead ofindex.html.builttarget serves the front withvite preview, never through the API the way production does.Found while running the browser suite against production for #305 (spec #303).
mentioned in commit
18aaa076aa