-
Notifications
You must be signed in to change notification settings - Fork 130
deno, node and deno-sw hello world examples #552
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
base: develop
Are you sure you want to change the base?
deno, node and deno-sw hello world examples #552
Conversation
@Superpat this is ready for your review whenever you've got time |
I'm not sure I'll have time to review this until after Fosdem, but thank you ! |
@nickchomey like I said in an earlier pr, I cant use the js version of esbuild on OpenBSD, so I cant review the sw bits. Can you switch the sw building code to use something like deno dnt instead ? Check the npm package build code, it's using deno dnt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globally it looks good, I'll want to run it first, but I need you to do a few changes as delineated in the comments.
Sure I'll figure out deno dnt |
@Superpat You can just run The only remaining "gotcha" is a couple second delay if your browser is still set to online, but the network request fails (eg deno is stopped) - it waits for that request to fail before falling back to service worker rendering. If you set the browser to offline, it goes there immediately. I could add some sort of background polling and a signal to pre-detect if the network/deno server is available, but that really isn't worthwhile for this proof-of-concept. ps. note that I've removed the sdk/typescript/examples directory |
… static assets, update Readme
I will try to finish reviewing this before the weekend is over. Still recovering from my ssd meltdown last week. |
It's been 84 years |
Here's the deno, node and deno-sw typescript sdk examples.
I had to make local copies of the static assets for the deno-sw example, as I was having difficulty with caching and serving external resources. Likewise, the html doc is served from an ES Module that contains a template literal of the doc, as I was having a lot of issues with serving a static file as the root route (
"/"
).If you want/know how to fix any of that, feel free to suggest the required changes. Otherwise, I think its fine as-is for the sake of a demo.