Fixing Fullstackbulletin.com part 8 - Twitch Live Stream
In this session we refactored we refactored and tested our Rust lambda.
This lambda scrapes a page from Mailchimp and extracts the issue number of the latest published newsletter.
We removed all the unwraps and did proper error handling using the crate thiserror (https://docs.rs/thiserror/latest/thiserror/).
We then externalised the URL and made it something configurable using an environment variable.
Finally, we did some additional testing and mocking, also using an HTTP mocking library called httpmock (https://docs.rs/httpmock/latest/httpmock/).
All the changes are published as part of this PR: https://github.com/FullStackBulletin/sls-create-newsletter-issue/pull/75
In the following live streams, we will update the other lambdas to use the issue number and we might also start to migrate some of the existing lambdas to Rust.
You can follow the next live streams at https://twitch.tv/loige
All the code is available at https://github.com/FullStackBulletin
Finally, if you want to subscribe FullStackBulletin, check it out at: https://fullstackbulletin.com/