A Deno-powered backend service for Plants vs. Zombies: MODDED. [Read-only GitHub mirror] docs.pvzm.net
express typescript expressjs plant deno jspvz pvzm game online backend plants-vs-zombies zombie javascript plants modded vs plantsvszombies openapi pvz noads
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 85 lines 3.6 kB view raw
1# compatibility for express.js 2NODE_ENV=production 3# MAIN CONFIG 4 5PORT=3000 6DB_PATH=./database.db 7DATA_FOLDER_PATH=./data # where level data is stored 8CREATE_DATA_FOLDER=true # create the data folder if it doesn't exist 9USE_PUBLIC_FOLDER=true # use public folder for static files 10PUBLIC_FOLDER_PATH=./public # where static files are stored 11USE_TEST_UI=true # enable access to test interface (/index.html) 12USE_ADMIN_UI=true # enable access to admin interface (/admin.html) 13GAME_URL=https://pvzm.net # url to the pvzm game, used in share links 14GAME_URL_SECRET=abcdefghijklmnopqrstuvwxyz0123456789 # secret appended to game URL requests to bypass WAF/bot protection. generate with openssl rand --hex 32 15BACKEND_URL=https://backend.pvzm.net # url to this backend, used in links for admins 16 17# CORS CONFIGURATION 18CORS_ENABLED=true 19# comma-separated list of allowed domains (no spaces) 20ALLOWED_ORIGINS=https://pvzm.net,https://backend.pvzm.net 21 22# ADMIN AUTHENTICATION 23USE_GITHUB_AUTH=true 24# Register a new OAuth app at https://github.com/settings/applications/new 25GITHUB_CLIENT_ID=some-client-id 26GITHUB_CLIENT_SECRET=some-client-secret 27# Comma-separated list of GitHub usernames allowed to access admin (no spaces) 28GITHUB_ALLOWED_USERS=username1,username2 29# A random string used to encrypt cookies and sessions 30SESSION_SECRET=some-random-secret 31 32# OPTIONAL SERVICES 33 34# use cloudflare turnstile for captcha 35USE_TURNSTILE=true 36# sign up for turnstile @ https://www.cloudflare.com/application-services/products/turnstile/ 37TURNSTILE_SECRET=some-turnstile-secret 38TURNSTILE_SITE_KEY=some-turnstile-site-key 39# accepts dummy tokens, DO NOT TURN ON IN PRODUCTION 40TURNSTILE_TESTING=false 41 42# use openai moderation to filter out bad content 43USE_OPENAI_MODERATION=true 44# youll need to top up your account with $5, but the endpoint is free to use 45# get your API key from https://platform.openai.com/account/api-keys 46OPENAI_API_KEY=some-openai-api-key 47 48# upload logging - posts to external services when levels are uploaded/updated/deleted 49# supports multiple providers (discord, bluesky, etc.) via the logging module 50USE_UPLOAD_LOGGING=true 51 52# discord logging provider (supports all events) 53# create a bot at https://discord.com/developers/applications 54# bot needs "Send Messages" and "Manage Messages" permissions in the upload channel 55DISCORD_PROVIDER_ENABLED=true 56DISCORD_BOT_TOKEN=some-discord-bot-token 57DISCORD_UPLOAD_CHANNEL_ID=some-discord-upload-channel-id 58# optional: separate channel for admin notifications (with edit/delete buttons) 59DISCORD_ADMIN_UPLOAD_CHANNEL_ID=some-discord-admin-upload-channel-id 60 61# reporting - posts to discord when levels are reported 62USE_REPORTING=true 63DISCORD_REPORT_CHANNEL_ID=some-discord-report-channel-id 64# user ids to mention in reports (prefix with & for a role id) 65DISCORD_MENTION_USER_IDS=some-discord-user-id,&some-discord-role-id 66 67# audit log - posts to discord when admins make changes (edit/delete/feature) 68DISCORD_AUDIT_CHANNEL_ID=some-discord-audit-channel-id 69 70# bluesky logging provider (supports upload events) 71BLUESKY_PROVIDER_ENABLED=false 72BLUESKY_IDENTIFIER=some-bluesky-identifier.example.com 73BLUESKY_PASSWORD=some-bluesky-password 74BLUESKY_PDS=https://pds.example.com 75 76# posthog analytics 77USE_POSTHOG_ANALYTICS=false 78POSTHOG_API_KEY=phc_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 79POSTHOG_HOST=https://us.i.posthog.com 80 81# opentelemetry (best for posthog logs) 82OTEL_DENO=true 83OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://us.i.posthog.com/i/v1/logs 84OTEL_EXPORTER_OTLP_LOGS_HEADERS=Authorization=Bearer phc_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 85OTEL_SERVICE_NAME=pvzm-backend