Wawaweewaa we covered a lot last time! This time, we'll go a bit slower.
Comment from last stream:
This code works great in-browser! Breakpoints are amazeballs!
BUT, getting them to work in Node.js requires one more step:
Not a lot of visibility into nested objects!
HTML forms are simple:
And modern frontend frameworks are essentially this:
Form data can be complicated to deal with...
NOTE: You probably don't want to use something like this live! It assumes the content is text, that it's not multipart and that the format is a "querystring":
Let's create a new route:
And a template:
A request to your server has a lifecycle! So let's add a step:
Form data is hard. We may have built a really simple parser but it works and all we need at the moment!
See you next time where we look at Hooking up a database to save some of that beautiful data.
Please don't hesitate to contact me or leave feedback on the course:
See today's code: https://github.com/frameworkless-js/remind.ist/tree/stage/3
See today's lesson running live: https://part3.remind.ist