Spaceboy.Router (Spaceboy v0.1.1) View Source
Router implementation for Spaceboy server.
Router is technically a Spaceboy.Middleware but it is so havily customized that you would not
recognize it. But of course you don't have to use this helper module and implement it from scratch
as Spaceboy.Middleware.
Spaceboy.Router is usually last middleware in your Spaceboy.Server but it is not requirement.
Link to this section Summary
Link to this section Functions
Adds redirect
Adds route for URL
Render static files route
Options
ls_dir?: boolean()- if true (default) directories will list it's filesmime: :guess | String.t()- what MIME type to use for files. Can be:guessto useMIMElibrary to guess mime type of files. Or can be specific MIME type e.g. "text/gemini" (default)