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

Add simple addFile function #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cyclops1982
Copy link

Might seem a bit strange, but let's say you store all your JS files in a
directory. Now, you want to host your service-worker.js in the root (for
scope reasons). This will allow you to do addFile('/service-worker.js',
'./js/service-worker.js');

This basically is a little bit of url-rewriting for an individual file.

Patch is untested as on debian9 the string_view is in std::experimental.

It would be great if you (ahu) could review is this is actually the right way to do it.

Might seem a bit strange, but let's say you store all your JS files in a
directory. Now, you want to host your service-worker.js in the root (for
scope reasons). This will allow you to do addFile('/service-worker.js',
'./js/service-worker.js');

This basically is a little bit of url-rewriting for an individual file.

Patch is untested as on debian9 the string_view is in std::experimental.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant