{"id":41313689,"url":"https://github.com/socrata/odn-backend","last_synced_at":"2026-01-23T05:27:54.043Z","repository":{"id":9541123,"uuid":"61655055","full_name":"socrata/odn-backend","owner":"socrata","description":"Backend for the Open Data Network.","archived":false,"fork":false,"pushed_at":"2025-10-06T18:58:15.000Z","size":1058,"stargazers_count":10,"open_issues_count":27,"forks_count":6,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-10-06T20:46:30.682Z","etag":null,"topics":["apps","solutions"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/socrata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-21T17:54:53.000Z","updated_at":"2025-10-06T18:58:20.000Z","dependencies_parsed_at":"2023-01-13T15:25:21.437Z","dependency_job_id":null,"html_url":"https://github.com/socrata/odn-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/socrata/odn-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fodn-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fodn-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fodn-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fodn-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socrata","download_url":"https://codeload.github.com/socrata/odn-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fodn-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apps","solutions"],"created_at":"2026-01-23T05:27:53.522Z","updated_at":"2026-01-23T05:27:54.037Z","avatar_url":"https://github.com/socrata.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ODN Backend\n\n[![Build Status](https://travis-ci.org/socrata/odn-backend.svg?branch=master)](https://travis-ci.org/socrata/odn-backend)\n[![Code Climate](https://codeclimate.com/github/socrata/odn-backend/badges/gpa.svg)](https://codeclimate.com/github/socrata/odn-backend)\n[![Test Coverage](https://codeclimate.com/github/socrata/odn-backend/badges/coverage.svg)](https://codeclimate.com/github/socrata/odn-backend/coverage)\n\nA REST API for the Open Data Network.\nAvailable at [api.opendatanetwork.com](http://api.opendatanetwork.com).\n\n## Documentation\n\nAPI documentation is available on [Apiary](http://docs.odn.apiary.io/).\n\n## Development\n\nThe ODN backend is built using [Node.js](https://nodejs.org/).\nAfter cloning the repository and downloading node,\nsimply run `npm install` from within the project directory\nto install all dependencies.\n\nThe ODN backend uses syntactic features of ES6 that are only available in\nrecent versions of Node, so it may fail to run with older versions.\nMake sure that you use the Node version specified in `package.json` (currently `6.2.2`).\nYou can check your node version using `node --version`.\n\n### Memcached\n\nThe ODN backend uses [memcached](https://memcached.org/)\nto cache responses from the Socrata backend and store map sessions.\n\n#### Installation with Homebrew\n\nMemcached is available over [homebrew](http://brew.sh/).\nTo install it, use `brew install memcached`.\nThere are many options for running `memcached` including the most direct: /usr/local/opt/memcached/bin/memcached\nTo see them all, use `brew info memcached`\n\n#### Flushing the Cache\n\nRun `./flush-memcache.sh` to flush the development cache.\n\n### Server\n\nUse `npm run server` to start the development\nserver at [localhost:3001](http://localhost:3001/).\nIt will automatically restart when the source is changed.\nStart a local memcached server to get maps to work.\n\n### Tests\n\nREST API tests are written using [Chakram](https://github.com/dareid/chakram)\nand run with [Mocha](https://mochajs.org/).\nThey are available in the `test` directory.\nRun tests using `npm test`.\n\nSometimes, running tests will trigger a webserver restart which\nwill then cause many tests to fail.\nIf this happens, start the server using `node app.js`.\n\n#### Test Coverage\n\nTest coverage reports for `master` are available on\n[Code Climate](https://codeclimate.com/github/socrata/odn-backend/coverage).\n\nTo view test coverage while in development:\nstart the server, run the tests, and then go to\n[localhost:3001/coverage](http://localhost:3001/coverage)\nto see the reports.\n\n### Deployment\n\nThe ODN backend is hosted on Heroku.\nThere are two environments:\n[production](http://odn-backend.herokuapp.com/) and\n[staging](http://odn-backend-staging.herokuapp.com/).\n\nTo deploy to an environment, push to the corresponding branch on github.\nFor production, push to `master` and for staging, push to `staging`.\nThere should be no need to manually deploy to Heroku,\nbut if you do, make sure that `master` stays in sync with what is\non Heroku.\n\nCheck LastPass for Heroku access.\n\n#### MemJS\n\nThe ODN uses the Heroku [MemJS](https://github.com/alevy/memjs) add-on\nfor memcached.\nThe cache is flushed on each deploy to avoid synchronization conflicts.\nMake sure to the `NODE_ENV` environmental variable to `production`\non every Heroku dyno so that the cache knows to flush itself.\n\n#### Integration Tests\n\nIntegration tests are run to check each deployment using\n[Travis CI](https://travis-ci.org/socrata/odn-backend).\nThese tests must pass for the deployment to succeed.\n\n#### Running Tests before Committing\n\nSince all tests must pass for a deployment to succeed,\nit is a good idea to run unit tests locally before pushing to GitHub.\nThe `pre-commit.sh` script will make sure that all unit tests succeed before\nevery commit. To install it, run:\n\n```sh\nln -s -f ../../pre-commit.sh .git/hooks/pre-commit\n```\n\n#### Load Tests\n\nThe `load-test.sh` script can be used to put load on the service.\nIt randomly generates thousands of valid URLs and then uses\n[Siege](https://www.joedog.org/siege-home/) to test them.\n\nFirst, install Siege. On a mac, just use `brew install siege`.\n\nThen, run the `load-test.sh` script with a domain.\nFor example, test against localhost, use\n\n```\n./load-test.sh localhost:3001\n```\n\nThis will start a small load test. To change the parameters of the test,\nedit `load-test.sh`. Please do not use this script on production.\nAlso, remember that the main bottleneck of the ODN API is the Socrata platform,\nand that a load test of the ODN is a load test of the platform.\nDon't take it down.\n\n### Logging\n\nAll Heroku logs are forwarded to [Sumo Logic](https://www.sumologic.com/).\nThis includes basic information for each request,\nas well as detailed stack traces for all exceptions and 500s.\nSearch with `_source=odn_api_heroku` to see all of the logs.\n\nUse the [Sumo dashboard](https://service.sumologic.com/ui/dashboard.html?f=76263689\u0026t=r)\nfor an overview of how the service is performing.\nFor access to this dashboard, use the Socrata Sumo account.\n\n### Monitoring\n\nThere are several Pingdom alerts that monitor the service:\n - [/data/v1/availability](https://my.pingdom.com/reports/uptime#check=2210560)\n - [/data/v1/constraint](https://my.pingdom.com/reports/uptime#check=2210566)\n - [/entity/v1](https://my.pingdom.com/reports/uptime#check=2202319)\n\nPingdom will alert Chris, Deep, Lane, and Tosh if the API is down.\nOnce apps are built around the ODN API, alerts will be sent to on call.\n\n## Adding Data to the ODN\n\nSee [`/data`](/data) for information on adding data to the ODN.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocrata%2Fodn-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocrata%2Fodn-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocrata%2Fodn-backend/lists"}