intermine/CDN

Name: CDN

Owner: InterMine

Description: JavaScript, Cascading Style Sheet Content Delivery Network

Created: 2012-05-31 09:24:44.0

Updated: 2017-09-26 07:34:58.0

Pushed: 2017-08-21 11:30:42.0

Homepage: http://cdn.intermine.org/

Size: 21755

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

InterMine Content Delivery Network

This repository hosts web libraries used in the InterMine ecosystem.

Host your own

The main repo is hosted by GitHub, but sometimes it goes down. Before that happens, we encourage you to host your own copy. Your apps will potentially work faster, depending on your location, and you will be fully in control.

Follow these steps:

  1. Make a fork of the following repo: git@github.com:intermine/CDN.git.
  2. Serve the repo using a static web server, such as Apache or nginx. Point your InterMine web-application at your local CDN installation by editing the global.web.properties file on the line where it says head.cdn.location:
.cdn.location = http://cdn.myserver.com
Making Use of Concatenation

If you want you can make use of the CGI script in the cgi directory to optimise requrests to the CDN. Doing so requires a web-server which supports CGI scripts. This is simple enough for Apache, for which a suitable configuration stanza is presented below:

s /cdn /path/to/clone/of/CDN
ectory /path/to/clone/of/CDN>
Options Indexes FollowSymLinks
Require all granted
AllowOverride FileInfo Options=ExecCGI
rectory>

This is also possible with nginx with a bit more work and research.

When this feature is enabled requests can be made of the form http://cdn.myserver.com/cgi/concat.rb?js=X&js=Y which will return the two JavaScript files concatenated together. These requests will be served with long expiries, which can be disabled by supplying the dev parameter. The InterMine web-app will automatically produce these optimised requests if the following configuration parameter is provided:

.cdn.cgi-enabled = true

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.