Quick Example using Azure’s Node.js SDK for Signed URLs / / No Comments Way back in June (wait, that’s only two months ago?) I wrote up a blog post showing how to use the AWS SDK for Signed URLs: "Quick example using AWS Node.js SDK V3 for Signed URLs". The idea for this was to cover a very specific set of functionality I needed to use along with Adobe’s Firefly Services. Specifically my needs are: Create a readable URL for a cloud storage asset Create a writable URL for a cloud storage asset And on top of that – also I needed to upload directly to cloud storage. I worked with Azure Storage Blob SDK and came up with the following functions. Honestly, use this with a grain of salt as it "worked for me", but I can’t make... more → Posted in: JavaScript Tagged with: Azure's, example, Node.js, Quick, Signed, URLs, using
Scraping Recipes Using Node.js, Pipedream, and JSON-LD / / No Comments It’s pretty well known now that most, if not all, recipes on the internet are 90% crap and 10% actual recipe, at best. Obviously, there are outliers of course and obviously, if you are sharing your recipes online you are free to do so as you see fit, but speaking for myself, when I click a link to a recipe my assumption is that I’m going to have to "work" to figure out where the actual details are amongst the humorous backstories and other tidbits that don’t actually tell you how to make what you’re trying to make. That’s why I love apps like Saffron. Not only is it incredibly minimal and laser-focused on recipes, it has an incredibly good "recipe... more → Posted in: JavaScript Tagged with: JSONLD, Node.js, Pipedream, Recipes, Scraping, using
A Quick First Look at Amazon Bedrock (with Node.js) / / No Comments My regular readers (hello, yall rock!) know I’ve been playing with generative AI the past few months. I’m still a bit skeptical about the amount of hype involved around the space, but I’m slowly getting more excited as I see some of the interesting possibilities available with these tools. Most of my recent exploration has been on the Google Gemini side, but after hearing my buddy Todd Sharp talk about Amazon Bedrock on his stream yesterday, I figured it was time to check it out. (FYI, you should absolutely check out his weekly Twitch show on the AWS Twitch channel called "Streaming on Streaming" – Wednesdays at 3PM CST.) Getting Started # So obviously, you want... more → Posted in: JavaScript Tagged with: Amazon, Bedrock, first, Look, Node.js, Quick
Three Cool (to me) Node.js Features / / No Comments I’ve been using Node.js on the regular now for probably over a decade, but one thing I’ve never done well is keep up to date with its features and new additions. In general, my brain just thinks "use javascript" and that’s all. The last time I really cared about what precisely was supported was when I was using fetch in client-side JavaScript and it wasn’t supported natively in Node. Luckily I could just use node-fetch and be done with it. That being said, I recognize I’ve not done a great job of keeping track of updates to Node itself so I try to notice it when folks mention it. Over the past week or so I’ve encountered not one, not two, but three... more → Posted in: JavaScript Tagged with: Cool, features, Node.js, three
Quick example using AWS Node.js SDK V3 for Signed URLs / / No Comments This probably falls into the "it was easy for everyone else in the world but me" bucket, but I really struggled to find good search results for this and figured I’d better write it down so when I google for it again in a few months, I’ll find my own blog. Specifically – today I was trying to use the AWS Node.js SDK to generate signed URLs. One to create read-only access to a bucket item and another to allow uploading. Everything I’m sharing is covered in the docs, but I struggled to find the relevant parts. So first off, V3 of the SDK is modularized, so instead of installing a giant SDK, you get just what you need. A lot of the demos show S3 so that’s handy.... more → Posted in: JavaScript Tagged with: example, Node.js, Quick, Signed, URLs, using
How to Use window.crypto in Node.js / / No Comments I’ve been writing a bunch of jest tests recently for libraries that use the underlying window.crypto methods like getRandomValues() and window.crypto.subtle key management methods. One problem I run into is that the window.crypto object isn’t available, so I need to shim it. To use the window.crypto methods, you will need Node 15+. You can set the window.crypto by importing the crypto package and setting it on the global: const crypto = require('crypto').webcrypto; // Shims the crypto property onto global global.crypto = crypto; I really loathe creating mock functions for missing libraries in Node because they can lead to faulty positives on tests; I really appreciate webcrypto... more → Posted in: JavaScript Tagged with: Node.js, window.crypto
8 new JavaScript features you might have missed – InfoWorld / / No Comments It’s not easy keeping up with all the new features the ECMAScript spec brings us every year. Let’s catch up with the highlights from ES11. The JavaScript juggernaut never stops. There are a number of features introduced by the “living spec” every year. Then it takes some time for the browsers, Node.js, etc. to roll them in, and before you know it, there’s a big pile of new JavaScript features you haven’t tried. It’s not too late. Here I’ve rounded up the ES11 (ECMAScript 11, aka ECMAScript 2020) features that you may have missed. They include a number of ergonomic and other modern improvements. Let’s take a look. Optional chaining Optional chaining is one of those simple-but-effective... more → Posted in: JavaScript Tagged with: ECMAScript 11, ECMAScript 2020, InfoWorld, JavaScript, JavaScript features, might, Node.js
Microsoft: Learn JavaScript Node.js with this new free course – ZDNet / / No Comments Microsoft: Learn JavaScript Node.js with this new free course ZDNet “JavaScript” – Google News… more → Posted in: JavaScript Tagged with: Course, free, JavaScript, Learn, Microsoft, Node.js, this, ZDNet