This is a URL shortener project built with Go lang. It allows you to create short and manageable URLs for your long URLs.
- Install Docker Desktop
- Test the installation by running:
docker-compose --version # Docker Compose version v2.6.1
- Make a copy of the
.env.example
file and save it as.env
:cp .env.example .env
- Setup the project with single command installation via docker:
docker-compose up --build -d
Clone the repository to your local machine:
sh git clone https://github.com/your-username/go-url-shortener.git
- Golang
- PostgreSQL
- Download Golang
- Test the installation by running:
go version # go version go1.19.2 darwin/arm64
-
Navigate to the right directory where your project will be locally saved
-
Clone this repository and move to
go-url-shortener
directorycd go-url-shortener/
-
Install go dependencies
go get
-
Install goose library for running migrations
-
Make a copy of the
.env.example
file and save it as.env
:cp .env.example .env
-
Update the
.env
file with relevant configurations. -
Run migrations
make migration-up-postgres
-
Start the server
make server