Website Link: Shortify
It is a URL-shortener made using NodeJS, ExpressJS and MongoDB. You just have to visit the website and enter the URL you want to shorten.
If there already exists a short version of the requested URL, you will be provided that short URL. If not, then a new short unique URL will be provided to you, which you can use for sharing.
- Fork this repository and clone it to your local system.
- Make sure you have nodejs and mongodb installed in your system beforehand.
- Use the command
npm installfor installing the node modules in your command line. Move to the cloned directory in your terminal beforehand. - Open app.js in your code editor.
- In place of
process.env.DB_URLwrite"mongodb://localhost:27017/myapp". This will make the mongodb connection of your app to myapp database in mongodb. - Replace
process.env.HOME_URLwith"http://localhost:1000"everywhere. - Start the mongodb server using the command
mongodin the command line. - Write the command
npm run startto start the server on port 1000 in command line. Make sure you are in the directory of the cloned repository before writing this command.
Enjoy!!!