Description
URL class in Node.js. The URL class provides utility for URLs. It can be used to create, parse, encode, decode, and perform other operations on URLs. javascriptCopy codeconst urlObject = new URL(process.env.NEXT_PUBLIC_APP_URL);
const host = urlObject.host;
Then, you can use the host variable wherever you need it. In your case, to create the vCard URL, you could do:
javascriptCopy codeconst vCardURL =
Please note that the URL class requires a full URL (including the protocol, such as 'http://' or 'https://'). No activity yet.