Reduce the length of the long URLs to short one, for easy sharing
- NPM
- MongoDB
- Git bash (Optional)
- Clone URL-Shotner using git command
git clone https://github.com/Sagargame10/URL-Shortner.git
or directly using Github website - Go to the root directory of the downloaded repository and download the npm dependencies type cmd command :
npm install
- Turn on Mongo Daemon i.e mongod and keep it running in background
- Again visit the root directory of the downloaded repository and run app.js using cmd command:
node app.js
. This will create a node server on port 3000. Keep the server running. - Open any browser and type in the url localhost:3000 . This will open the home-page for URL-Shortner
- Now you can enter the Long URL in the Enter URL field and generate the corresponding Short URL.
Note : While entering the long URL, please enter the whole URL i.e include https:// or http:// before the URL.
Ex: https://github.com/Sagargame10/URL-Shortner
For regenrationg a new url, you can directly type the new url in the Enter URL field or click on the URL-Shortner logo to visit home page.