Replies: 3 comments 5 replies
-
import serveStatic from 'serve-static'; this didn't help solve the problem. Maybe there is another solution? |
Beta Was this translation helpful? Give feedback.
-
https://github.com/kartikk221/live-directory can be used for this. |
Beta Was this translation helpful? Give feedback.
-
Anybody knows a relatively easy-to-use actual library that doesn't involve pre-caching the actual files? A bit like what serve-static would actually do? LiveDirectory is good for generic assets embedded into the websites But not so much for user-generated files that can be quite massive in total Serve-static couldn't be used as-is, because there were incompatibilities with how said library would set Content-Length header (it'd try to set raw non-string value and hyper-express doesn't like that) Also I'm aware that if for the purpose of serving user-generated files with quite massive total size, it'll generally be better to just use an actual reverse proxy servers like nginx and whatnot, but humor me please |
Beta Was this translation helpful? Give feedback.
-
app.use(express.static('public'))
how to implement such code in hyper-express?
Beta Was this translation helpful? Give feedback.
All reactions