Skip to content

docs: update js runtime docs #2362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abcxff
Copy link
Contributor

@abcxff abcxff commented Apr 14, 2025

Changes

This PR updates the JavaScript runtime documentation to use Deno instead of Node.js:

  • Replaced Node.js http module with Deno's native HTTP server API
  • Updated environment variable access to use Deno.env.get() instead of process.env
  • Changed server shutdown handling to use await server.finished instead of an empty promise
  • Added "access": "public" to the example rivet.json configuration
  • Updated the API client initialization comment to specify "API service token"

Copy link
Contributor Author

abcxff commented Apr 14, 2025


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@abcxff abcxff marked this pull request as ready for review April 14, 2025 00:47
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR updates the JavaScript runtime documentation to reflect the use of Deno's API instead of Node.js, modernizing the code examples for Rivet actors.

  • Updated HTTP server example to use Deno.serve instead of Node.js's http module in /site/src/content/docs/javascript-runtime.mdx
  • Changed environment variable access from process.env to Deno.env.get for proper Deno compatibility
  • Added access: "public" property to the rivet.json configuration example
  • Updated API token reference from "API token" to "API service token" for clarity
  • Aligned documentation with actual implementation as shown in the example projects' deno.json files

💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: b4df5f9
Status: ✅  Deploy successful!
Preview URL: https://4f7845af.rivet.pages.dev
Branch Preview URL: https://04-13-docs-update-js-runtime.rivet.pages.dev

View logs

@abcxff abcxff requested review from NathanFlurry and removed request for NathanFlurry April 17, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant