const ursh = require("ursh");
(async () => {
let url = "https://foo.bar";
let custom = "foobar";
let response = await ursh.add(url, custom);
console.log(response);
/*{
error: false,
key: 'foobar',
long: 'https://foo.bar',
short: 'https://ursh.deta.dev/foobar',
timestamp: 1663049744100
}*/
})();
Get Details Of Shorten URL!
(async () => {
let code = "foobar";
let response = await ursh.get(code);
console.log(response);
/*{
error: false,
key: 'foobar',
long: 'https://foo.bar',
short: 'https://ursh.deta.dev/foobar',
timestamp: 1663049744100
}*/
})();