component-github-proxy

0.0.2 • Public • Published

component-github-proxy

An express handler that will download and compile components from github dynamically

var Proxy = require('component-github-proxy');
var app = express();
var server = http.createServer(app);

var proxy = Proxy({
	tmpfolder:'/tmp/wheretobuildcomponents'
})

app.use('/builds', proxy);

server.listen(80, function(){

})

Using the above setup we can request the following URLs to have the javascript and css for the component:

<link rel="stylesheet" href="/builds/username/repo/build/build.css" />
<script src="/builds/username/repo"></script>

Until improvements are made you need to request the javascript first before the css can be served. This only applies to the first time you compile a component.

/component-github-proxy/

    Package Sidebar

    Install

    npm i component-github-proxy

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • binocarlos