← Back

Node.js Bridges for Web Novel Syncing

Syncing a web novel across WordPress, a static backup on R2, and a Discord bot for chapter notifications.

The naive approach: git hooks. Author pushes a chapter .md to a repo, CI builds it, deploys everywhere. Heavy, slow, and the author doesn't use git. They write in Google Docs.

I built a lightweight Node.js bridge service:

Google Docs API poll -> diff detection -> markdown conversion
  -> WordPress XML-RPC push (chapter as draft)
  -> R2 object write (parallel)
  -> Discord webhook (chapter title + link)

Runs on a $6/mo VPS. Poll interval: 5 minutes. Detection: character-level diff against the last-pulled revision, so it catches even a single typo fix.

The Discord bot posts a formatted embed with cover art, chapter number, and a 'Read on Web' / 'Read on Backup' button pair. If WordPress is down (it happens), readers still get the chapter from R2.

Author writes. Everything else is plumbing. Pipeline runs. No one thinks about it.