Coding challenge
Task: Shortening URL:
- High level design for a URL Shortening system such as goo.gl or bit.ly the idea is to design a service that would generate a shorter URl for the long URLS
Focuses on Backend only
- Generate a short url
- Redirect to the origin url if you tried to open the shorten link in browser
Nodejs, Expressjs, MongoDB, Mongoose, Mocha, Sinon, Docker, Docker Compose
- Most of the classes depends on the Single responsibility concept.
- Generated unique key based bcrypt package.
- Express, is a very lightweight web framework.
- MongoDB one of the most famous document database.
- Mocha, Sinon for unit testing.
- Express generator, to generate a simple boiler plate
https://www.linkedin.com/in/ahmed-elbassel/
localhost:3000/docs
- Clone the repo, and go inside it then the below command, if the commands don't run, try it with sudo:
[email protected]:elbassel/shorting-url.git
cd shorting-url
docker-compose build
docker-compose up
- Check localhost:3000/docs for API documentation
npm run test
##Run Code coverage: Yoy can find the result under coverage folder
npm run coverage