I want to implement universal links in my project and I need to serve a json via Koa, which is a static file named apple-app-site-association.
My file is located in /assets/apple-app-site-association/apple-app-site-association folder.
My concern is that I cannot access this https://myprojectlink/apple-app-site-association.
What I have at this moment:
const path = require("path");
const Koa = require("koa");
const mount = require("koa-mount");
const serve = require("koa-better-serve");
app.use(mount("/apple-app-site-association", serve(path.resolve(__dirname,"../../../assets/apple-app-site-association/apple-app-site-association"))));
I get Not Found, it seems like I cannot serve it in the right way.
What can I do?
Thank you very much in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…