A simple URL shortening service.
Used tools:
This service saves a short URL for 7 days.
/a/create
Example using HTTPie:
http POST localhost:3000/a/create url="https://github.com/LuisHenriqueFA14"
Return:
{
"id": "d3969cdd-d931-487c-9ed1-85316b894902",
"origin": "https://github.com/LuisHenriqueFA14",
"short": "rxra15uj3c"
}
/p/:page
Example using HTTPie:
http GET localhost:3000/p/rxra15uj3c
Return:
Found. Redirecting to https://github.com/LuisHenriqueFA14
In the browser, it redirects to the original URL.
Install the dependencies:
yarn --prod
# or
npm i --prod
Build the TypeScript files:
yarn build
# or
npm run build
Run the project:
yarn start
# or
npm run start
Install the dependencies:
yarn
# or
npm i
Run the project:
yarn dev
# or
npm run dev