Skip to content

Kaduh15/Encurtador-URL-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

54 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Encurtador Url

ย 

Encurtador de URL - API ๐Ÿ”—

Github top language Github language count Repository size License Github stars

๐Ÿ Starting

Install Encurtador-URL with npm

# Clone this project
$ git clone https://github.com/kaduh15/encurtador-url-api

# Access
$ cd encurtador-url-api

# Install dependencies
$ npm install

# Run the project
$ npm start

# The server will initialize in the <http://localhost:3001>

API Reference

add URL

POST /add-url

  • Objective: Adiciona URL.
  • Code HTTP: 201 - Created;
  • Body (exemplo):
{
  "url": "http://www.exemplo.com", // Any valid URL;
}

RESPONSE Body:

{
  "id":1,
  "shortURL": "ty2ZF", // Short URl;
  "originalURL": "http://www.exemplo.com", // Original URL
}

Access URL

GET /:shortURL

  • Objective: Redirect to Original URL.
  • Code HTTP: 200 - Success;
  RESPONSE Redirected to the desired URL

Tech Stack

Server: Node JS Express Mysql Docker

๐Ÿ“ License

This project is under license from MIT. For more details, see the LICENSE file.

Made with โค๏ธ by Kaduh15

ย 

Back to top