mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-13 11:35:26 +00:00
13 lines
365 B
JavaScript
Executable File
13 lines
365 B
JavaScript
Executable File
import * as url from "m3o/url";
|
|
|
|
// Shortens a destination URL and returns a full short URL.
|
|
async function ShortenAlongUrl() {
|
|
let urlService = new url.UrlService(process.env.MICRO_API_TOKEN);
|
|
let rsp = await urlService.shorten({
|
|
destinationURL: "https://mysite.com/this-is-a-rather-long-web-address",
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
await ShortenAlongUrl();
|