Skip to content
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

fix(cli/tools): correct deno init --serve template behavior #25318

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

cotyhamilton
Copy link
Contributor

fix #25305

  • adds static folder and asset
  • makes the static server test in the template more meaningful
  • reorders args in help message
  • fixes output to conform to default deno fmt

@CLAassistant
Copy link

CLAassistant commented Aug 30, 2024

CLA assistant check
All committers have signed the CLA.

@cotyhamilton
Copy link
Contributor Author

I would have liked to have used fsRoot along with urlRoot in the ServeDirOptions to show them off but the rust tests complained that fsRoot option didn't exist 🤷‍♀️ I think maybe the version of std lib isn't all the way up to date

{
  pattern: new URLPattern({ pathname: "/static/*" }),
  handler: (req) => serveDir(req, { fsRoot: "static", urlRoot: "static" }),
},

@cotyhamilton cotyhamilton marked this pull request as ready for review August 30, 2024 22:08
@cotyhamilton cotyhamilton changed the title fix(cli/tools) Update deno init --serve template fix(cli/tools) Update deno init --serve template Aug 30, 2024
@iuioiua iuioiua self-assigned this Aug 30, 2024
Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

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

Great! Thank you.

cli/tools/init/mod.rs Show resolved Hide resolved
@iuioiua iuioiua changed the title fix(cli/tools) Update deno init --serve template fix(cli/tools): correct deno init --serve template behavior Sep 2, 2024
@iuioiua iuioiua enabled auto-merge (squash) September 2, 2024 22:29
@iuioiua iuioiua merged commit 2533d68 into denoland:main Sep 2, 2024
17 checks passed
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.

deno init --serve is confusing
4 participants