CLI and library for downloading United States Congress data (sitemaps, JSON) and importing it into MongoDB via Mongoose schemas. Version 1.2.0, last updated in 2018. Requires external CLI tools (congress, congress-legislators) and MongoDB 3.2+. Provides predefined models (Member, etc.) and a convenience connect() function. No active updates; dependencies are outdated.
npm install congress-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MongoDB, fetches current members of Congress, and prints them.
Run './node_modules/.bin/congress fetch' or install globally with a different name.
Pin mongoose to 4.x or update the package to support newer versions.
Check the upstream 'congress' package for updates; this package may not work as expected.
Always pass a URI string or ensure MONGODB_URI is set and passed explicitly.
Use the default import and call models() or connect().
Install mongoose: npm install mongoose@^4.0.0
Use: import congress from 'congress-mongodb'
Call congress.connect(mongoose, uri) with both arguments.
Use a different port or stop existing MongoDB instance.