val-town / val-town-docs

Val Town Documentation
https://docs.val.town/
28 stars 25 forks source link

Refactor code in "Guides / Saving data from a web page" article #76

Open Xkonti opened 9 months ago

Xkonti commented 9 months ago

Code in the "Saving data from a web page" article is still using a val to store data. Code blocks should be refactored to use blob storage instead. Additionally all code should be presented as code blocks instead of embedding vals.

stevekrouse commented 7 months ago

@Xkonti could you work on this next please? Thanks!

Xkonti commented 7 months ago

@stevekrouse On it!

andreterron commented 7 months ago

Additionally, the Run API is now deprecated. We need to swap it with something else.

Xkonti commented 7 months ago

This is what I have planned for updating this one:

  1. Explain that blob storage will be used but sqlite can be used as well.
  2. Create API val that receives a comment and saves it to blob storage.
  3. Demonstrate how to get to the API endpoint from JS on the website.
  4. Demonstrate how to read from the blob storage and display it on the website.
  5. Use anything that supports HTTP to read from the blob storage.
stevekrouse commented 7 months ago

Could make two different guides, blob and sqlite, and contrast them, and user test them, and possibly even merge them both and explain the differences.