Skip to content

Scripts and Migrations

These scripts handle targeted data corrections. They are not part of regular startup or development workflow.

ScriptLocationPurpose
backfill-images.jsscripts/Backfills missing image fields on existing articles
backfill-images-from-source.jsscripts/Fetches and backfills images from original source URLs
republish-articles.jsrootRe-triggers publish logic for a batch of articles
Terminal window
cd news-server
# Make sure .env is in place and MongoDB is reachable
node scripts/backfill-images.js