Routes to expose file

69 views
Skip to first unread message

Daniel Guilhermino

unread,
May 31, 2019, 10:54:16 AM5/31/19
to web2py-users
HI,

I'm having trouble exposing a file in the following way:


I configured my routes.py like this:

routers = dict (

     # base router
     BASE = dict (
         default_application = 'connect',
         root_static = ['favicon.ico', 'sw.js', 'well-known / file.json'],
     ),
)
routes_in = (
         ('well-known / file.json', '/app/static/file.json'),
     )
routes_out = ('/app/static/file.json','well-known/file.json')

Note:

The file are in static folder, I don't created 'well-known' folder.

But web2py crashes ...

Any suggestions on how I can resolve this issue?

Thanks in advance and best regards!

Dave S

unread,
May 31, 2019, 6:07:39 PM5/31/19
to web2py-users


On Friday, May 31, 2019 at 7:54:16 AM UTC-7, Daniel Guilhermino wrote:
HI,

I'm having trouble exposing a file in the following way:


I configured my routes.py like this:

routers = dict (

     # base router
     BASE = dict (
         default_application = 'connect',
         root_static = ['favicon.ico', 'sw.js', 'well-known / file.json'],
     ),
)
routes_in = (
         ('well-known / file.json', '/app/static/file.json'),
     )
routes_out = ('/app/static/file.json','well-known/file.json')

Note:

The file are in static folder, I don't created 'well-known' folder.

But web2py crashes ...

Crashes in what way?  Does the web2py.exe (or from source, python web2py.py) exit?
Or do you get an entry in myapp/errors that includes a traceback?
What gets displayed by the crash?
 
Do you really have spaces around the '/' after 'well-known' ?


Any suggestions on how I can resolve this issue?

Thanks in advance and best regards!

Good luck!

/dps
 

Daniel Guilhermino

unread,
May 31, 2019, 8:57:34 PM5/31/19
to web2py-users
Hi Dave,

I'm running the source package on ubuntu.

Show Only this message:

Internal server error

Doesn't created an ticket.

I need to make this file available for Google to validate my PWA and run the application (I made an apk and uploaded it on Google Play as TWA) without showing the navigation bar.

This file contains sha256_cert_fingerprints.

Thanks and best regards.

Daniel Guilhermino

unread,
Jun 4, 2019, 11:02:58 AM6/4/19
to web2py-users
Any other suggestions?

Daniel Guilhermino

unread,
Jun 6, 2019, 10:06:52 PM6/6/19
to web2py-users
Dave,

After hours, I found this post:


They helped me solve it, although I believe there must be another better way to solve it.

Now I've posted a PWA App on Google Play that runs web2py!


It's just a demo layout, but it's functional and any changes just need to be made on the server, no more daily updates to the user via Google Pay, everything will be runtime.

Many thanks for your help!

Best regards,

Daniel Guilhermino
Reply all
Reply to author
Forward
0 new messages