2017-06-25 01:31:36 +02:00
|
|
|
# Go Vanity URLs
|
|
|
|
|
|
|
|
Go Vanity URLs is a simple App Engine Go app that allows you
|
|
|
|
to set custom import paths for your Go packages.
|
|
|
|
|
|
|
|
## Quickstart
|
|
|
|
|
2017-06-25 01:45:16 +02:00
|
|
|
Install [gcloud](https://cloud.google.com/sdk/downloads) and install Go App Engine component:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ gcloud components install app-engine-go
|
|
|
|
```
|
|
|
|
|
|
|
|
Setup a [custom domain](https://cloud.google.com/appengine/docs/standard/python/using-custom-domains-and-ssl) for your app.
|
|
|
|
|
2017-06-25 01:31:36 +02:00
|
|
|
Get the application:
|
|
|
|
```
|
|
|
|
go get -u -d github.com/GoogleCloudPlatform/govanityurls
|
|
|
|
cd $(go env GOPATH)/github.com/GoogleCloudPlatform/govanityurls
|
|
|
|
```
|
|
|
|
|
2017-06-26 01:49:28 +02:00
|
|
|
Edit `vanity.yaml` too any number of git repos. E.g., `CUSTOM_DOMAIN/portmidi` will
|
2017-06-26 01:53:09 +02:00
|
|
|
serve the [https://github.com/rakyll/portmidi](https://github.com/rakyll/portmidi) repo.
|
2017-06-25 01:31:36 +02:00
|
|
|
|
|
|
|
```
|
2017-06-26 01:49:28 +02:00
|
|
|
/portmidi:
|
|
|
|
repo: https://github.com/rakyll/portmidi
|
2017-06-25 01:31:36 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Deploy the app:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ gcloud app deploy
|
|
|
|
```
|
2017-06-26 02:01:06 +02:00
|
|
|
|
|
|
|
That's it! You can use `go get` to get the package from your custom domain.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ go get CUSTOM_DOMAIN/portmidi
|
|
|
|
```
|