denoland / denoland/std

Add support for an SPA fallback in `@std/http/file-server`

Open
#6,554 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

I'm deploying an SPA that uses path routing, so I need to convert 404s into requests for the `index.html` page.

**Describe the solution you'd like**

Add in support for a fallback page to `fileServer`

**Describe alternatives you've considered**

`if (res.status == 404) { serveFile() }`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.