This service will provide short aliases redirecting to long URLs.
Our URL shortening system should meet the following requirements:
- Given a URL, our service should generate a shorter and unique alias of it. This is called a short link. This link should be short enough to be easily copied and pasted into applications.
- When users access a short link, our service should redirect them to the original link.
- Links will expire after a standard default timespan that is 15 days.
- The system should be highly available. This is required because, if our service is down, all the URL redirections will start failing.
- URL redirection should happen in real-time with minimal latency.
- Shortened links should not be guessable (not predictable).
- Our service should also be accessible through REST APIs by other services.
To use urlShortner, follow these steps:
Note: Don't forget change your redis hostname and port no.
git clone https://github.com/eswar2001/urlShortner.git
cd urlShortner
cd server
npm install
nodemon index.js
cd ..
cd client
npm install
npm start
Add run commands and examples you think users will find useful. Provide an options reference for bonus points!
To contribute to urlShortner, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively see the GitHub documentation on creating a pull request.
If you want to contact me you can reach me at [email protected].
This project uses the following license: MIT License.