Coder Social home page Coder Social logo

rmm5t / googleapis-mirror Goto Github PK

View Code? Open in Web Editor NEW
46.0 8.0 13.0 50 KB

A subset mirror of the Google Libraries API CDN meant to be served from your local development machine when internet access is lacking.

Ruby 100.00%
googleapis mirror ruby

googleapis-mirror's Introduction

Google Library APIs Mirror

This is a subset mirror of the Google Libraries API CDN meant to be served from your local development machine when internet access is lacking.

Instructions

Step 0: Clone this repository

git clone git://github.com/rmm5t/googleapis-mirror.git

Step 1: Run rake sync to download a copy of all the libraries listed in libraries.txt.

You'll probably want to run this step before you lose internet access.

Step 2: Run sudo rake serve or just sudo rake (serve is the default task). This binds a new virtual IP address (172.16.88.88) to the loopback interface, and maps ajax.googleapis.com to it using the OS X Directory Service. It also starts a web server bound to the new virtual IP address such that http://ajax.googleapis.com/ behaves like a local mirror for the Google Libraries.

NOTE: You must run this as sudo. To stop the local web server mirror, just Ctrl-C the rake process.

Alternatives

If you aren't on OS X, you can alternatively map ajax.googleapis.com to 127.0.0.1 using /etc/hosts or any equivalent. You will also need to create a virtual host on your local web server to serve ajax.googleapis.com. Here's an example for Apache:

<VirtualHost *:80>
  ServerName ajax.googleapis.com
  DocumentRoot "/path/to/googleapis-mirror"
  <Directory "/path/to/googleapis-mirror">
     Options Indexes
     Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

Author

Ryan McGeary (@rmm5t)

License

MIT License

googleapis-mirror's People

Contributors

babarnazmi avatar rmm5t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.