Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Return0Software/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-shortener

r0s.io URL shortener

Bring up db

docker-compose up # --build if first time
docker exec -ti url-db mongo # connect to db

Bring up server

cd services/server
yarn run dev

Bring up client

cd services/client
yarn run start

API

# Create a new shorten url
curl localhost:8000/s -H "Content-Type: application/json" -XPOST --data '{"originalUrl":"https://www.espn.com","shortBaseUrl":"https://r0s.io"}'

# Access shortened url
curl localhost:8000/s/{urlCode from previouse response}