Skip to content

Add wrangler.toml and fix index.js code #24

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

Merged
merged 2 commits into from
Oct 21, 2019
Merged

Add wrangler.toml and fix index.js code #24

merged 2 commits into from
Oct 21, 2019

Conversation

exvuma
Copy link
Contributor

@exvuma exvuma commented Oct 21, 2019

fixes #16

This is the default wrangler generate template so all nits welcome 😸

@exvuma exvuma requested a review from a team October 21, 2019 19:37
* @param {Request} request
*/
async function handleRequest(request) {
return new Response('Hello worker!', { status: 200 })
return new Response('Hello worker!', {
headers: { 'content-type': 'text/plain' },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

status 200 is the default, so I found that irrelevant. I wanted to include one example of modifying ResponseInit though and it's best praactice to include Content-type anyways so I added that

@@ -0,0 +1,7 @@
name = "helloworld"
type = "javascript"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we make default webpack instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably. It'd also be great to move index.js from the top level and create a src directory and point package.json:main to ./src/index.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ill make an issue for that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#26

Copy link
Contributor

@EverlastingBugstopper EverlastingBugstopper left a comment

Choose a reason for hiding this comment

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

lgtm

@exvuma exvuma merged commit aadd62b into master Oct 21, 2019
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.

Add wrangler.toml with type
2 participants