[Feature]
- Feature of redis implementation in code pairing is present in link PR-1
It generates short-code on bases of keys. The range of keys is provided to each server.Using fastify framework for performance and maintainability.
- The default range is { min : 0, max : 9999}. The key service which is not part of this project can be responsible for provided one when api server's range of keys exhaust. The maximum key can go upto 2 to the power of 64.
- The same url created anonymously will get same token
-
npm install
//Install packages -
npm run dev
//for development run -
npm start
//for prod run -
Runs at
http://localhost:3000/
-
POST : /anonymous/create
Create shortlink request as anonymous userbody : {url : "https://github.com/bron10/url-shortner"}
-
GET : /:token
Request redirection to actual url This newly generated token is recieved in each request