Skip to content

babariviere/short

Repository files navigation

short

URL Shortener written in Go.

Requirements

Note

If you are using Nix, you can just run nix develop . or direnv allow if you use Direnv.

Dev dependencies

  • ogen to generate OpenAPI server

Running the app

Once you have installed all requirements, you can simply do:

docker compose up -d
just migrate # or atlas migrate apply --env local
go run .

Accessing the docs

The docs is using the openapi.yaml provided in the root directory. A web UI is available at http://localhost:8080/docs. It's using Rapidoc under the hood.

Testing

You can simply test using:

# ensure postgres is up
docker compose up -d
go test ./...

It will create database on the fly for each test.

About

URL Shortener written in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published