>
>
> The main thing about PWAs appears to be that the service worker javascript 
> files need to be accessible from the domain root.
> ...
> The main issue I'm having so far is getting a 404 error when trying to 
> load the service worker file (upup_sw.js) which I think is a path issue 
> (inside upup.js).
>
> Any ideas?
>

To serve files from root you'll need to set it up in your routes.py file  
(e.g. mine looks like this...)

routers = dict(
    # base router
    BASE = dict(
        default_application = 'your app here',
        applications = ['your app here'],
        default_function = 'index',
        root_static = [
            'favicon.ico',
            'robots.txt',
            'manifest.json',
            'sw.min.js',
            ],
    ),

Then I have the above files I want serving from root located in my 
app_name/static directory.

more info: 
http://web2py.com/books/default/chapter/29/04/the-core?search=routes.py#URL-rewrite
and if you view the comments in the default routes.py file it should also 
help (specifically the root_static var)

HTH,




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to