Skip to content

Overview

news-server is the Express.js backend for the Wirero platform. It handles all API traffic — from the admin dashboard, from child-site frontends, and from the automated RSS ingestion cron job.

Quick Facts

Runtime
Node.js + Express
Entry point
`server.js` → `app.js`
Database
MongoDB via Mongoose (port 27017)
Default port
4000
Auth types
JWT Bearer (admin/publisher) + API key (child sites)
Module pattern
`index.js` controller, `model.js` schema, `routes.js` router
  • Handles login and JWT issuance (/api/v1/auth)
  • CRUD and publishing logic for articles (/api/v1/article)
  • Site, tag, category, section, and geo management
  • Publisher account management and RSS feed ingestion (/api/v1/publisher)
  • Read-only client endpoints for child-site frontends (/api/v1/client)
  • Signed S3 URL generation for image uploads (/api/v1/sign-s3)
Terminal window
cd news-server
npm install
node server.js

On a successful start you’ll see:

MongoDB connected
Server running on port 4000