-
Notifications
You must be signed in to change notification settings - Fork 10
feat: DVC-9055 adding Cloudflare Worker example app for new js-cloud-server-sdk #561
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
| RESPONSE=$(curl -s http://localhost:8787) # Replace with your server's port | ||
| # Check the response or do something based on the result. | ||
| if [[ "$RESPONSE" != *"DevCycle Variables:"* ]]; then | ||
| echo "Server didn't return the expected 'DevCycle Variables:' response" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| RESPONSE=$(curl -s http://localhost:8787) # Replace with your server's port | |
| # Check the response or do something based on the result. | |
| if [[ "$RESPONSE" != *"DevCycle Variables:"* ]]; then | |
| echo "Server didn't return the expected 'DevCycle Variables:' response" | |
| exit 1 | |
| fi | |
| RESPONSE=$(curl -s http://localhost:8787) | |
| if [[ "$RESPONSE" != *"DevCycle Variables:"* ]]; then | |
| echo "Server didn't return the expected 'DevCycle Variables:' response" | |
| exit 1 | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also - would you not want to do more clear sanitizing and checks via jq?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can, I'm more interested in if it actually returns anything and doesn't throw a worker error, which this checks for.
| RESPONSE=$(curl -s http://localhost:8787) # Replace with your server's port | ||
| # Check the response or do something based on the result. | ||
| if [[ "$RESPONSE" != *"DevCycle Variables:"* ]]; then | ||
| echo "Server didn't return the expected 'DevCycle Variables:' response" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also - would you not want to do more clear sanitizing and checks via jq?
| "target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, | ||
| "lib": ["es2021"] /* Specify a set of bundled library declaration files that describe the target runtime environment. */, | ||
| "jsx": "react" /* Specify what JSX code is generated. */, | ||
| "module": "es2022" /* Specify what module code is generated. */, | ||
| "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, | ||
| "types": ["@cloudflare/workers-types"] /* Specify type package names to be included without being referenced in a source file. */, | ||
| "resolveJsonModule": true /* Enable importing .json files */, | ||
| "allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */, | ||
| "checkJs": false /* Enable error reporting in type-checked JavaScript files. */, | ||
| "noEmit": true /* Disable emitting files from a compilation. */, | ||
| "isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */, | ||
| "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */, | ||
| "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, | ||
|
|
||
| "strict": true /* Enable all strict type-checking options. */, | ||
| "skipLibCheck": true /* Skip type checking all .d.ts files. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why all the comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not comments? It's actually kinda nice having an explanation for each setting.
I'm assuming this is one of those flavors of JSON that allows comments, like the VS Code config files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments were all from the example app I generated using Cloudflare's CLI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do that for our cli too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do that for our cli too, and maybe the sdk proxy too
581c1ea to
596e031
Compare
a65390f to
e57af12
Compare
4f3188b to
65c293b
Compare

No description provided.