1
2
3
4
5
6
7
8
export const thisExpressURL = () => {
let { valName, userHandle } =
new Error().stack.match(/@@({.+?})@@/g).map((e) =>
JSON.parse(e.slice(2, -2))
)[1];
return `https://${userHandle}-${valName}.express.val.run`;
};
// Forked from @easrng.thisReference