nomadro/deploy/router
Eric ffa456afdf Ship social join profile + SeaweedFS avatars, notify/coffee, and .com audience stack.
Pay-then-profile join desk with live card, S3 upload fallback, hydration-safe drafts; document on test9 README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-04 02:25:05 +08:00
..
nomadro-router.service feat: Umami/ntfy 可观测性栈与 WordPress AdSense 部署 2026-08-15 23:49:19 -05:00
package.json feat: Umami/ntfy 可观测性栈与 WordPress AdSense 部署 2026-08-15 23:49:19 -05:00
README.md Ship social join profile + SeaweedFS avatars, notify/coffee, and .com audience stack. 2026-11-04 02:25:05 +08:00
server.mjs Ship social join profile + SeaweedFS avatars, notify/coffee, and .com audience stack. 2026-11-04 02:25:05 +08:00

Audience router

nomadro.com is split by audience:

Audience Destination
Chinese users (nomadro_route=zh, via language/timezone sniff) Next.js :4003
English users / default WordPress :8088
Googlebot / AdsBot / other crawlers WordPress (AdSense English surface)

First HTML visit without a cookie gets a same-origin sniff page that sets nomadro_route and reloads.

Detection(对齐 src/lib/audience.ts):

  1. WeChat / WeCom in-app UA (MicroMessenger / wxwork) → Chinese lane
  2. Else is-china-user language + timezone sniff (any Chinese in navigator.languages)
  3. Else English / intl → WordPress

Router listens on 127.0.0.1:4403.

Deploy

python deploy/router/deploy_router.py

Or on server:

cd /var/www/nomadro-router
npm install --omit=dev
cp nomadro-router.service /etc/systemd/system/
systemctl enable --now nomadro-router
cp /path/to/Caddyfile /etc/caddy/Caddyfile
systemctl reload caddy