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

docs: add an html + javascript example #20

Merged
merged 9 commits into from
Jun 12, 2024
Merged

docs: add an html + javascript example #20

merged 9 commits into from
Jun 12, 2024

Conversation

jpcsmith
Copy link
Contributor

@jpcsmith jpcsmith commented Jun 11, 2024

This adds a javascript + HTML example.

Depends on walrus #515 to enable PUT requests from browsers to the client daemon.

If you feel this is too complicated, let me know and I can simplify it.

TODO:

  • Add a readme file describing the steps to setup the example (run the daemon, open the HTML file in the browser).

Contributes to #11

@jpcsmith jpcsmith requested a review from gdanezis June 11, 2024 16:56
@jpcsmith jpcsmith self-assigned this Jun 11, 2024
Copy link
Collaborator

@mlegner mlegner left a comment

Choose a reason for hiding this comment

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

Thanks for the example, @jpcsmith. I don't know much about JS, so I can't comment much on the code itself.

But I ran it locally and it works! 💯

Just two optional suggestions from my side.

examples/javascript/hello_walrus_webapi.html Outdated Show resolved Hide resolved
examples/javascript/hello_walrus_webapi.html Outdated Show resolved Hide resolved
Copy link
Contributor

@gdanezis gdanezis left a comment

Choose a reason for hiding this comment

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

Also not a JS guru here (in fact n00b) but tested it and it works. Just one suggestion below to add a few links:

  • Can we add a link to a Sui explorer so that people can go see their object (ensure its pointing to testnet).
  • Since this is web, can we add a link to the Walrus docs?

examples/javascript/hello_walrus_webapi.html Outdated Show resolved Hide resolved
@jpcsmith jpcsmith marked this pull request as ready for review June 12, 2024 12:20
@jpcsmith jpcsmith requested a review from mlegner June 12, 2024 12:22
@jpcsmith
Copy link
Contributor Author

jpcsmith commented Jun 12, 2024

Hey @mlegner, could you just briefly do a sanity pass by running this on your own machine to ensure I didnt miss break anything for others? Otherwise it's ready to merge.

Copy link
Collaborator

@mlegner mlegner left a comment

Choose a reason for hiding this comment

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

Amazing work, @jpcsmith! Runs very smoothly, just noticed some very minor issues.

examples/javascript/README.md Outdated Show resolved Hide resolved
examples/javascript/README.md Outdated Show resolved Hide resolved
@mlegner mlegner mentioned this pull request Jun 12, 2024
2 tasks
@jpcsmith jpcsmith merged commit 0178d83 into main Jun 12, 2024
5 checks passed
@jpcsmith jpcsmith deleted the docs/js-example branch June 12, 2024 13:49
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.

4 participants