Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 910 Bytes

File metadata and controls

29 lines (20 loc) · 910 Bytes

URL Shortener

Description

This is a Web Application made in Golang as a URL shortener. This application used PostgreSQL running on Docker in order to have a database.

To build this it was also used the GIN Framework as Web Framework and GORM Framework to handle the data.

How to run it:

  1. Since the models will be automated created as tables in the database, to start the application you can simply make the following command, and then you can start to make requests to localhost:8080.
make run

How to test it:

Create a new short version of a URL:

  • POST request to localhost:8080/short-url
{
  "longUrl": "https://github.com/renatompf"
}

Get (and redirects) a longer URL:

  • GET request to localhost:8080/short-url/:shortURL