URL Shortner is an Express Application for Generating short URLs on your domain. Often we want to share links to a website to other platforms, But the links are too long.
If I talk about this blog. The link will be something like...
https://dev.to/pranjaljain0/creating-a-very-simple-url-shortner-using-express...
Which is already occupying 77 characters when it can occupy around 10 characters.
Find a complete tutorial here.
- Nodejs
- Firebase Account
Clone this repo and cd into the directory...
https://github.com/pranjaljain0/url-shortner.git && cd url-shortner
npm install to install all required packages
npm install
run nodemon to debug the application
nodemon index.js
A new link can be generated by running this command on your terminal
curl -H "Content-Type: application/json" -d '{"url":{URL TO STORE AS STRING}}' http://localhost:3000/new
And as a link is generated you can use that link to go to the website stored for that link.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.