Node.JS Express Project to Build Custom URL Shortener Using API in Browser Using AJAX & Javascript

Node.js Express Project to Build Custom URL Shortener Using API in Browser Using AJAX & Javascript

var shortUrl = require("node-url-shortener");
 
shortUrl.short("https://google.com", function (err, url) {
  console.log(url);
});

$.ajax({
    url: 'https://cdpt.in/shorten?url=google.com',
    dataType: 'json',
    success: function(data) {
        console.log(data);
    }
});

Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment