Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 693 Bytes

README.md

File metadata and controls

39 lines (24 loc) · 693 Bytes

url-shortener

Assuming Docker is installed and is running

Fetch

git clone [email protected]:yvann/url-shortener.git && cd ./url-shortener

Run

Start the application with:

docker compose up

Then visit http://localhost:3500/api/shorturl/analytics

Shorten an URL with:

curl -X POST -d 'originalUrl=https://www.lunii.com' http://localhost:3500/api/shorturl/

# -> {"originalUrl":"https://www.lunii.com/","shortUrl":"5HjPOA"}

Then try the redirection at http://localhost:3500/api/shorturl/5HjPOA

Ensure the visit is counted at http://localhost:3500/api/shorturl/analytics

Test

Run the tests with:

docker compose run --rm app yarn run test