There are 2 ways to host the playground:
We deployed API Playground on Cloudflare Workers.
git clone git@github.com:Acrylic125/fntu.git then cd api and pnpm i.Once cloned,
.env.example and name it .env. Configure it based on the instructions in .env.pnpm dev to run a local dev environment.
The project uses:
Run the following commands:
# Create KV namespace, fntu_api_kv
npx wrangler kv namespace create fntu_api_kv
# Add database URL secret. Paste in the DB URL.
npx wrangler secret put DATABASE_URL
# Add API Key Secret for signing API Keys
# 1. Generate a secret. Use a different secret than the one you used for .env.
openssl rand -hex 32
# 2. Add API KEY SECRET. Paste the generated string from (1).
npx wrangler secret put API_KEY_JWT_SECRET
To test the deployment, run pnpm dev.
To deploy, run pnpm run deploy.