Skip to content

Development

🚧 Work in progress 🚧

This project is a monorepo and uses pnpm workspace.

git clone https://github.com/ziteh/yangchun-comment.git
cd yangchun-comment
pnpm install
pnpm build
ENVDescTypeDefault Value
FRONTEND_URLThe URL of your site.string
MAX_MSG_LENGTHThe max number of characters of comment message can input.integer1000
MAX_PSEUDONYM_LENGTHThe max number of characters of comment pseudonym can input.integer60
MAX_ALL_SITE_RSS_COMMENTSThe max number of RSS feed comments showing.integer15
HMAC_SECRET_KEYA random string used for HMAC token generation.
Select a long and strong random string.
string
ADMIN_SECRET_KEYA random string used for admin login JWT.
Select a long and strong random string.
string
CORS_ORIGINThe allowed origin for CORS requests.string*
RSS_SITE_PATHRSS feed URL prefix.stringsite

For production, use Cloudflare Workers Environment Variables or Secret.

Example:

# .dev.vars
HMAC_SECRET_KEY=956be06a6eb1eee252e1405ce8e113c4055b5e0adce17f16
CORS_ORIGIN=*
cd server
pnpm dev