GithubHelp home page GithubHelp logo

poy / csr-meta Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/govanityurls

2.0 2.0 0.0 51 KB

go get from Cloud Source Repositories. Source code for https://code.gopher.run

License: Apache License 2.0

Go 100.00%
gcp go

csr-meta's Introduction

csr-meta

Cloud Source Repositories (CSR) does not serve the required meta tags for go get to work correctly. csr-meta attaches the required meta tags. It assumes that the repo name does not have any slashes and uses each request to build the meta tags. Therefore

<hostname>/myproj/myrepo

corresponds to

source.developers.google.com/p/myproj/r/myrepo

Quickstart

Install gcloud and install Go App Engine component:

$ gcloud components install app-engine-go

Setup a custom domain for your app.

Get the application:

go get -u -d github.com/poy/csr-meta
cd $(go env GOPATH)/src/github.com/poy/csr-meta
paths:
  /portmidi:
    repo: https://github.com/rakyll/portmidi

You can add as many rules as you wish.

Deploy the app:

$ gcloud app deploy

That's it! You can use go get to get the package from your custom domain.

$ go get customdomain.com/portmidi

Environment Variables

Name Required Description
CACHE_AGE optional The amount of time to cache package pages as a time.Duration (e.g., 24h). It will be rounded to the nearest second. Controls the max-age directive sent in the Cache-Control HTTP header.
HOST optional The host that the code is being redirected from. It defaults to code.gopher.run.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.