Deploy
The API is a Deno server at src/main.ts. The documentation site is a Docusaurus app in
docs-site/.
Deploy the API to Deno Deploy
Use the Deno Deploy console:
- Push the repository to GitHub.
- Open the Deno Deploy console.
- Create a new app in your organization.
- Select the GitHub repository or choose a local-source deployment flow.
- Set the entrypoint to
src/main.ts. - Leave build commands empty.
- Deploy to production.
Or create and deploy from the current directory with the current Deno Deploy CLI:
deno deploy create --org=<your-org-slug> --app=<your-app> --source=local --region=global --runtime-mode=dynamic --entrypoint=src/main.ts .
deno deploy --org=<your-org-slug> --app=<your-app> --prod .
Deploy the Documentation
Build the Docusaurus site:
cd docs-site
npm run build
Set SITE_URL when you want canonical and Open Graph URLs to use your production domain:
SITE_URL=https://your-production-domain npm run build
The static output is written to:
docs-site/build
You can deploy that folder to any static hosting provider.
Same-Origin Playground
The playground fills its API base URL from the current page origin. For the best experience, serve the documentation and API from the same domain, or put a reverse proxy in front of them:
/docs -> Docusaurus site
/resolve -> Deno API
/download -> Deno API
If the docs and API are hosted separately, users can still edit the API base URL in the playground.
Verify After Deployment
Current API base
Detecting the current page origin.../health
/resolve?url=https://v.douyin.com/2LjM6XJNEXQ/