What I’m trying to do:
Wrap my web app for Android.
I am required to provide proof of ownership by placing a .well-known/assetlinks.json file in the root directory.
What I’ve tried and what’s not working:
Created the ssh key, cloned the repo, added the file to root directory, then commit and push.
Still parapeet.com/.well-known/assetlinks.json is not found.
Neither is parapeet.com/LICENSE.txt .
Should I be using routing in server side code?
Is there another way?
Here are some links with the same / similar request from a while back where an answer was missing or incomplete:
Hi everyone!
Is there a way to include a static file directly under an app domain root? For example https://my-app-domain.anvil.app/ data.json
Thanks very much
Simon
Hi - I’m still getting to grips with version control and using Github for collaborating and merging different branches before re-importing into Anvil.
One thing I noticed, and can’t find help on the Forum, is that I can only add a LICENSE in the client_code or server_code folders as a form or .py file respectively. Then after a Git clone, the License is buried in the relevant subfolder rather than appearing in the root folder (which is the normal practise for Github e.g. when you use https://…
Hi there!
To turn a web app into a Progressive Web App (PWA), it is necessary to have a manifest.webmanifest file served from the top-level directory of the website, as described here https://web.dev/add-manifest/ . Does anyone have any experience with doing this in Anvil or could tell me how it might be done?
Thanks in advance!
Simon
You’ll probably find this thread helpful:
Hi @rickhurlbatt ,
You have actually stumbled across an unreleased feature, which is fully implemented and supported, but not yet documented. Here is what you’re looking for:
@anvil.server.wellknown_endpoint("/assetlinks.json")
def assetlinks():
return ["assetlinks", "json", "goes", "here"]
We’ll be releasing the autocompletion and documentation for this soon, but the summary is that this wellknown_endpoint decorator works exactly like the http_endpoint decorator, but the endpoints you confi…
2 Likes