Skip to content

URL-Shortener project in GO. Using Postgres, GIN and GORM

Notifications You must be signed in to change notification settings

renatompf/go-url-shortener

Repository files navigation

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

About

URL-Shortener project in GO. Using Postgres, GIN and GORM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published