Skip to content

Static file helper #108

@vsergeev

Description

@vsergeev

More of a request than an issue, but it'd be nice to have a route helper for static files, e.g. https://flask.palletsprojects.com/en/stable/quickstart/#static-files . Of course, users could open a file and stream it themselves in a request handler, but a native static file helper would 1) expedite a very common use case, 2) allow everyone to benefit from various optimizations (mmap, caching, etc.), 3) offer more safety compared to a user's implementation.

This might be a rabbit hole, but I'd be happy with a handful of totally static paths (not directories, wildcards, etc.).

For my use case, 99% is a websocket server, and otherwise I need to deliver 2-3 bundled files to serve the frontend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions