Skip to content

baylorhenshaw/go-vanity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💫 Go Vanity ✨

A minimal web server for creating vanity Go module URLs.

Tip

View this project live at go.baylor.dev!

What is Go Vanity?

Go Vanity is a simple web server that allows you to host Go modules with your own vanity url. For example, instead of ...

go get github.com/baylorhenshaw/go-vanity

You can use ...

go get go.baylor.dev/go-vanity

💾 Installation 💿

Warning

Installation instructions coming soon!

🔧 Configuration 🔨

Modules File

Important

You must define the path for this file in your environment variables!

In order to configure Go Vanity, you need a .json file containing your module configuration. Here is an example ...

{
    "modules": [
        {
            "name": "go-vanity",
            "github": "https://github.com/baylorhenshaw/go-vanity"
        }
    ]
}

This will add the vanity url https://yourdomain.com/go-vanity/ and it will redirect to the proper Github repository. You can add as many modules as you need in this config file.

Environment Variables

You can get started with Go Vanity with these environment variables ...

HOST=yourdomain.com
PORT=3000
MODULES_FILE=modules.json

Umami Analytics

You can enable Umami Analytics by adding the following environment variables ...

UMAMI_URL=<insert-umami-url>
UMAMI_ID=<insert-website-id>