Skip to content

docs: update first-project guide for new deno init template (2.8)#3086

Merged
bartlomieju merged 1 commit into
denoland:2.8from
lunadogbot:docs/2.8-init-template-update
May 20, 2026
Merged

docs: update first-project guide for new deno init template (2.8)#3086
bartlomieju merged 1 commit into
denoland:2.8from
lunadogbot:docs/2.8-init-template-update

Conversation

@lunadogbot
Copy link
Copy Markdown
Contributor

Summary

Updates the "Making a Deno project" walkthrough to match the new default deno init template shipping in Deno 2.8 (denoland/deno#33042). The template now scaffolds a small Deno.serve HTTP server (with two tests) instead of the old add(2, 3) math example.

  • Rewrites the description of main.ts and the run/test output blocks in runtime/getting_started/first_project.md.
  • Mentions the import.meta.main guard so readers understand why the tests import the handler directly.

Test plan

  • deno task serve — page renders.
  • If reviewers want me to verify the exact test names against the upstream template, I can adjust before merge.

The default \`deno init\` template in Deno 2.8 generates a small
Deno.serve HTTP server instead of the previous add(2,3) example.
Updates the getting-started "Making a Deno project" walkthrough to
match the new template — replaces the addition output with the
listening message and updates the test runner example accordingly.

Refs denoland/deno#33042
@crowlKats crowlKats changed the base branch from main to 2.8 May 5, 2026 11:43
Copy link
Copy Markdown
Contributor

@fibibot fibibot left a comment

Choose a reason for hiding this comment

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

Two generated-template details do not match merged denoland/deno#33042, so readers would copy commands/output that the 2.8 deno init template does not produce.

  1. $ deno main.ts should be deno run --allow-net main.ts; upstream init prints that command, and the scaffolded Deno.serve(handler) path needs net permission.
  2. handler returns hello / handler returns 404 for unknown route should match the generated main_test.ts names: returns html on / and returns json on /api. The template does not generate a 404 test.
  • nit: bump last_modified; this is a substantive content update.

@bartlomieju bartlomieju merged commit 45ed008 into denoland:2.8 May 20, 2026
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.

3 participants