- All links have been converted now need to do emails or references to factiii.com
- You can achieve this by using the `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.
Here's an example of how you can extract just the hostname (e.g. 'localhost:3000') from a URL:
```
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 = `URL;TYPE=Digital Business Card:${host}/vcard/jon`;
```
Please note that the `URL` class requires a full URL (including the protocol, such as 'http://' or 'https://'). If your environment variable doesn't include a protocol, you'll need to add it before passing it to the `URL` constructor.