Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static assets middleware #34

Open
breezykermo opened this issue Jan 2, 2019 · 0 comments
Open

Static assets middleware #34

breezykermo opened this issue Jan 2, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@breezykermo
Copy link
Member

With the addition of sources in Timemap, it has become evident that ds-s would benefit from middleware that can serve static assets.

The infrastructure for middleware already exists, and a simple version of this could be easily written that just exposes the assets in some subdirectory at a given prefix on ds-s.

It would be good in general, however, for middleware to also be able to hook into blueprinter functions, so that it can modify not only the routes that are available on ds-s, but also the structure and nature of the data in certain blueprints. Specifically for static asset middleware, this would be useful to allow the middleware to prefix paths loaded from a datasheet with the appropriate domain name/prefix on ds-s, so that such information does not need to be 'hardcoded' into the sheets themselves. There would still be coupling between the datasheet and the static directory structure, as the pathnames of the static assets could not be dynamic--but it would prevent details of ds-s configuration--the prefix of static assets--from needing to be manually curated in the datsheet.

@breezykermo breezykermo added the enhancement New feature or request label Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant