Daniel Schwarz 4 months ago
DevOps
I learned how to generate static content with Postman and send it to Shopify (automated once per day)
Daniel Schwarz 4 months ago
God damnit I broke my streak somehow :(
Dmitrii Pashutskii 4 months ago
Postman can generate something? The last time I used it it was only an API client. PS Sorry to hear that, you are still the first! 🎉
Daniel Schwarz 4 months ago
Yep! In Postman, you can write JavaScript in "Pre-request Script." So, I'm accessing the Simple Analytics API and constructing HTML tables with API data. Then... pm.globals.set("body_html", theCompleteHTML); body_html is sent to Shopify, and then users can see our visitors/devices/browsers as plain HTML instead of heavy JavaScript and API calls for every pageload. Use monitors to schedule the run once per day to update the API data on Shopify.
Dmitrii Pashutskii 4 months ago
Wow, that's powerful.
Daniel Schwarz 4 months ago
Indeed! I only found out about it this week, so lots more to learn.