gitproximus

1.1.0 • Public • Published

gitproxim.us

GitHub proxy like rawgithub except:

  • Intended for production use (eventually)
  • Intended future ES6 module transforms - rewrite import commands to long URLs
  • Allow semantic versions instead of git references
  • Also supports tarballs and zipballs

i.e. you can do GET /component/emitter/^1.0.0/index.js

API

Environmental Variables

  • GITPROXIMUS_FILE_MAXAGE - max-age for each individual file
  • GITPROXIMUS_REDIRECT_MAXAGE - max-age for semver resolution redirects

GET /:user/:repo/:version/:file...

Pretty much like raw.github.com. Examples:

GET http://gitproxim.us/component/emitter/master/index.js
GET http://gitproxim.us/component/emitter/*/index.js
GET http://gitproxim.us/component/emitter/~1.1.2/index.js
GET http://gitproxim.us/component/emitter/^1.1.2/index.js

Note that * is special - if there are no semver tags, then it defaults to master. Other semver ranges will simply 404.

GET /:user/:repo/:archive(tarball|zipball)/:version

Return a zipball or tarball. Examples:

GET http://gitproxim.us/component/emitter/tarball/*
GET http://gitproxim.us/component/emitter/tarball/1.1.2
GET http://gitproxim.us/component/emitter/tarball/^1.1.2
GET http://gitproxim.us/component/emitter/zipball/*

License

The MIT License (MIT)

Copyright (c) 2014 Jonathan Ong me@jongleberry.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

none

Package Sidebar

Install

npm i gitproximus

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • jongleberry
  • fishrock123