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.
- 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
- POST request to
localhost:8080/short-url
{
"longUrl": "https://github.com/renatompf"
}
- GET request to
localhost:8080/short-url/:shortURL