-
Notifications
You must be signed in to change notification settings - Fork 3
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
[3/?] Add ability to run code examples in the playground: Fetch tutorial snippet from URL by file name #205
Conversation
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.
This looks good, just the little typo.
Always happy to accept PRs to allow calls from tutorial.ponylang.io
. I am a bit hesitant to allow CORS requests from everywhere, unless we have proper monitoring and alerting and the ability to rate-limit/block clients.
Co-authored-by: Matthias Wahl <[email protected]>
If you're ready, feel free to convert to "ready for review" status and we can merge it. Thanks! |
Looks like this has conflicts from merging #222 that need to be resolved. It wasn't straightforward enough for me to feel good about resolving it in the web editor without any testing. |
@jemc Conflicts resolved |
(Also it looks like the branch still has conflicts ❓ ) |
@jemc What gives you that impression? I don't see any pending conflicts |
…ang/pony-tutorial since it was meant to be used by ponylang/ponyc Co-authored-by: Joe Eli McIlvain <[email protected]>
Hmmm... I guess it doesn't have conflicts. Maybe I misunderstood something I saw in the GitHub UI? But I'm not seeing it now. |
See ponylang/pony-tutorial#340
Warning
Will only work, after #222 has been merged.
Example: https://playground.ponylang.io/?snippet=hello-world-main.pony
If we add
.layer(CorsLayer::permissive())
here, we could even call the API from the tutorial and display the result below the code block (apparently, this had already been done in 2014, when the API was still written in Python: 02d0a98):pony-playground/src/api.rs
Line 31 in 59b1ffd
or, if we want to be a little more restrictive, it could look like this: