Skip to content

Instantly share code, notes, and snippets.

@jedahan
Created January 14, 2013 16:36
Show Gist options
  • Select an option

  • Save jedahan/4531346 to your computer and use it in GitHub Desktop.

Select an option

Save jedahan/4531346 to your computer and use it in GitHub Desktop.

Here is an api built off the metropolitan museum's collections website

A testing version is available on collections-api.herokuapp.com

Questions, bug reports and feature requests are appreciated, please submit them to github issues

This repository and its contents are CC0

Dedicated to the memory of Aaron Swartz

Setup

The API requires node.js, recommends redis, and supports dtrace.

To run locally, install node.js, then just npm install && sudo npm start. Make sure all the tests pass with npm test. Ignore the Redis errors for now, but it is highly recommended to install later, as redis will speed up the server considerably AND reduce the load on the metropolitan musuem's website. Let's play nice when scraping.

Usage

Visit localhost to browse the api, pretty UI courtesy of swagger.

The restify framework has first-class support for DTrace, so enjoy the performance analysation tools.

Dependencies

Options

  • Set COLLECTIONS_API_NO_CACHE to ignore caching

Deployment

A Procfile is included if you want to spin up an instance up on heroku. Use RedisToGo for caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment