Skip to content

Gavazadd/serverless_test_task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Serverless ShortLinker Product Specs

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.

Project initialization

To start working on this project, you need to do the following steps:

  1. Run commands:

    npm install -g serverless
    npm ci
  2. Copy the content of the example.env file into .env file and set environment variables.

  3. Run command:

    npm run deploy
  4. After first deploy, add API_URL and QUEUE_LINK to env. file.

  5. Now, start the project by running again the command:

    npm run deploy

Endpoints

Auth

  • /auth/registration (POST) - register
  • /auth/login (POST) - login

Link

  • / (POST) - create link
  • / (GET) - get all my links
  • /:url (GET) - redirect to original link
  • /:shortUrl (DELETE) - delete my link

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published