Long URLs can be inconvenient to use, especially in correspondence. To solve this problem, there are services that shorten long links. I have built cost-efficient and flexible API for a link shortener application.
To start working on this project, you need to do the following steps:
-
Run commands:
npm install -g serverless
npm ci
-
Copy the content of the example.env file into .env file and set environment variables.
-
Run command:
npm run deploy
-
After first deploy, add API_URL and QUEUE_LINK to env. file.
-
Now, start the project by running again the command:
npm run deploy
- /auth/registration (POST) - register
- /auth/login (POST) - login
- / (POST) - create link
- / (GET) - get all my links
- /:url (GET) - redirect to original link
- /:shortUrl (DELETE) - delete my link