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

Add TS example of handling POST data from a router. #1046

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

technosophos
Copy link
Contributor

@technosophos technosophos commented Nov 16, 2023

Content must go through a pre-merge checklist.

Pre-Merge Content Checklist

This documentation has been checked to ensure that:

  • The title, template, and date` are all set
  • Does this PR have a new menu item (anywhere in templates/*.hbs files) that points to a document .md that is set to publish in the future? If so please only publish the .md and .hbs changes in real-time (otherwise there will be a menu item pointing to a .md file that does not exist)
  • File does not use CRLF, but uses plain LF (hint: use cat -ve <filename> | grep '^M' | wc -l and expect 0 as a result)
  • Has passed bart check
  • Has been manually tested by running in Spin/Bartholomew (hint: use PREVIEW_MODE=1 and run npm run styles to update styling)
  • Headings are using Title Case
  • Code blocks have the programming language set to properly highlight syntax and the proper copy directive
  • Have tested with npm run test and resolved all errors
  • Relates to an existing (potentially outdated) blog article? If so please add URL in blog to point to this content.

Signed-off-by: Matt Butcher <matt.butcher@fermyon.com>
@technosophos technosophos self-assigned this Nov 16, 2023
Signed-off-by: Matt Butcher <matt.butcher@fermyon.com>
@technosophos
Copy link
Contributor Author

Huge thanks to @bacongobbler for finding a couple of potential fixes.

@karthik2804
Copy link
Contributor

@technosophos this looks great. Out of curiosity, would it be better if we add an example of using the router with the spin-component-route along with it and make it a more general example of the usage of the router?

@technosophos
Copy link
Contributor Author

@karthik2804 Yeah, that is a good idea. Let me add that.

Signed-off-by: Matt Butcher <matt.butcher@fermyon.com>
@technosophos
Copy link
Contributor Author

Okay, @karthik2804 -- updated in both

@itowlson itowlson merged commit fbfd08f into fermyon:main Nov 21, 2023
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.

3 participants