Running Express and React in the same project

All of us have, at some point, stood in front of a mirror looking into our own soul and asked the question that every JavaScript developer is destined to ask before they die - “How do you run Express and React in the same project”? This week I revisited my answer to that existential nightmare in the form of a refresh to the Express React Starter. Because I feel a desperate need to get some content out this week AND the original blog post on the subject is completely AFK, here’s another run down of how I use Express to serve up React....

How to add your dotfiles to GitHub Codespaces

One of the first things you are gonna realize after you get started with Codespaces, is that you desperately want your own custom environment setup that you enjoy locally to somehow magically be in Codespaces as well. You can do that using a “dotfiles” repo, and in this post, we’re going to look at how to setup a dotfiles repo, and what quirks you need to be aware of to use it with Codespaces....

Converting Cosmos DB Timestamps to JavaScript Dates

Cosmos DB automactially adds a timestamp field called “_ts”. everytime a document is created or updated. And it looks like this… { "_ts": 1628083065 } That number is described by this blog post as an “epoch value in seconds (not milliseconds) since an item was last modified.” The number of seconds since what? Well, the number of seconds since January 1st, 1970 to be exact. This is a Unix date format (aslo called “epoch”) and you can use JavaScript to convert that into a date object that you can actually use....

Upload an Image to Azure Storage with Static Web Apps

One of the great advantages to Azure Static Web Apps should be the ability to easily integrate with other Azure services. I’ve been working on a sample blog project a la the old Ruby on Rails tutorial, and I wanted to add the ability to upload an image to a blog. Now, there are two ways to go about this. You can do it from the client, or you can do it from the server....

How to use 'Dark Mode' in VS Code

After my post on how to auto-switch your theme based on the time of day, a few readers pointed out that VS Code “does this automatically”. In other words, you don’t need the extension that I recommended to do this. I had no idea! Is this true? Kind of… While VS Code doesn’t have built-in ability to change your theme based on the time of day, it does have the ability to change your theme based on whether or not you are using “Dark Mode” in your Operating System....

Google trends shows Python interest surging

While looking at Google Trends the other day for “visual studio code”, I noticed that one of the rising trends was “visual studio code format json”. Today, it’s gone, but still in the top related queries along with “how to format code”. This got me curious as to what it is that people search for the most along with “visual studio code” or “vs code” in the last 12 months....

How to switch themes in VS Code based on the time of day

It’s a good idea to switch between dark and light mode depending on what time of day it is. During the day when your body is more awake, it might make more sense to use a light theme where reading comprehension is better. At night, your eyes become more tired and bright screen light can be harder on your tired eyes. Visual Studio Code doesn’t do this out-of-the-box, but just like Steve Jobs once said, “There’s an extension for that”....

Beginner's series to Dev Containers free video course

"Knowledge isn't free. You have to pay attention." — Richard Feynman Ok, but all “play on words” aside, knowledge is free. That’s the key contribution of the internet, isn’t it? That all knowledge is now essentially free? And this is kind of a recent development. It used to cost quite a bit to learn the skills that will make you successful. I mean, there is still a 700 billion dollar industry built on selling you knowledge....

Using Azure Logic Apps to auto-print sales orders

No / Low Code tools (NoLow - I just coined that) have been the holy grail of software since I got into programming. I remain optimistic, but skeptical in regards to the idea that some day anyone will be able to build apps. Optimistic because we really need to get humans out of the business of writing code wherever we can. Less code means less bugs. Skeptical because in the 15 years I’ve been a developer, I’ve watched so many of these tools come and go....

How to configure a root domain in an Azure Static Web App

This article is now obsolete. Please use the official Custom Domain supportin Azure Static Web Apps....