Skip to content

Time to say bye to long URLs and hello to streamlined communication with shortify. Experience the power of link shortening with shrotify today.

License

Notifications You must be signed in to change notification settings

t1ltxz-gxd/shortify

Repository files navigation

Preview

Stars Open issues License Powered by Go Powered by Postgres


🧩 Installation

git clone https://github.com/t1ltxz-gxd/shortify.git 
cd shortify
go build

⚙ Configuration

Setup environment variables

Linux/MacOS

chmod +x ./dotenv.sh
./dotenv.sh

Windows

.\dotenv.ps1

Makefile

make env

Open config/config.yml and fill in the values

🚀 Launch

Run go run cmd/grpc_server/main.go or make start.

🧹 Linters

Run golangci-lint run cmd/... internal/... pkg/... --config=./.golangci.yml or make lint.

🧪 Tests

Run go test ./internal/... -v or make test.

🏇 Benchmarks

Run go test ./internal/... -bench=. -benchmem or make bench.


🌐 Deployment

Run docker-compose up -d.


🔎 Example of usage

Creating a short link

grpc://{{base_url}}/url_v1.UrlV1/Post?url=https://example.com

# Response
{
    "short_url": "{{base_url}}/abc123_ABC"
}

Getting the original link

grpc://{{base_url}}/url_v1.UrlV1/Get?hash=abc123_ABC

# Response
{
    "url": "https://example.com"
}

🤝 Contributing

Contributions are what make the open source community an amazing place to learn, be inspired, and create. Any contributions you make are greatly appreciated.

  1. Fork the repository
  2. Clone your fork git clone https://github.com/t1ltxz-gxd/shortify.git
  3. Create your feature branch git checkout -b AmazingFeature
  4. Stage changes git add .
  5. Commit your changes git commit -m 'Added some AmazingFeature'
  6. Push to the branch git push origin AmazingFeature
  7. Submit a pull request

❤️ Credits

Released with ❤️ by Tilt.

About

Time to say bye to long URLs and hello to streamlined communication with shortify. Experience the power of link shortening with shrotify today.

Topics

Resources

License

Stars

Watchers

Forks

Packages