Heroku React Express Content Security Policy With Stripe, Cloudinary and Google Fonts

How to fix “Refused to connect to xxx because it violates the following Content Security Policy directive” on Heroku I’ve deployed a MERN stack app to Heroku: Mongo DB, Express.js, React.js, Node.js. The app uses Google Fonts and Stripe Checkout. I’ve built the React app via Create React App. My last deploy went wonkers. The app didn’t load any JavaScript because of Content-Security-Policy failures. In this post I’ll show you how to fix those errors and how to successfully re-deploy your MERN app to Heroku.
Read more →

Friday Picks 068

Read more →

Traefik 2 Docker Swarm Setup With Docker Socket Proxy and More

Traefik is an open-source router and load-balancer that sits in front of your web services. You can set it up to automatically encrypt your websites with SSL certificates. It’s also easy to add new web services to an existing Traefik cluster. image from the official Traefik website I discovered Traefik via Jakub Svehla’s post Building a Heroku-like infrastructure for $5 a month. He shows you how to use Docker to install a Traefik infrastructure on a cheap VPS like DigitalOcean.
Read more →

Friday Picks 067

Read more →

Friday Picks 066

Here are some links for this weekend. I hope you’ll enjoy them! Full Stack Serverless - Building a Real-time Chat App with GraphQL, CDK, AppSync, and React: a concise tutorial by Nader Dabit Build A Confirmation Modal in React with State Machines: learn more about state machines with Dave Ceddia Building Microservices with Deno, Reno, and PostgreSQL: by James Wright Show your latest dev.to posts automatically on your GitHub profile readme: a GitHub action that automatically fetches blog posts from dev.
Read more →

F# Language Support for Vim on Linux

Last week I had the crazy idea to build a basic web server with F# on my Linux system. I’m spoiled by Vim’s language support for other languages: hover information, autocomplete, etc. The experience is nearly as good as using VS Code. But (Neo)Vim doesn’t come with all the cruft of Microsoft’s Electron-based editor. I thought it would be trivial to get decent language support F#. After all, I’ve already done the work of setting up the necessary plugins and configuration for Vim.
Read more →

Friday Picks 065

Read more →

(Free) Go Golang Resources in 2020

Go has been one of the languages I wanted to learn for years. It’s a beginner-friendly and fast compiled programming language. Go is object-oriented but free of classes. Learn more about Go on the official website. Free Resources Awesome Go: tons of free tutorials from the “Awesome Go” GitHub repository Go by Example: a concise intro How To Code in Go eBook: free ebook by DigitalOcean Learn Go with Tests: learn test-driven development with Go Learning Cloud Native Go: micro-services architecture with Go Ultimate Go study guide: a repository with notes on learning Go and computer systems Paid Resources These are the resources that I have found on reddit and elsewhere which seem to be popular.
Read more →

Friday Picks 064

Here are some resources for you: Testing React Apps: a guide for testing React applications with the Jest framework How to Code in Go: free ebook for learning Go How to get started with the 11ty (Eleventy) Blog Starter: a tutorial on using Eleventy and Sanity.io (a content management system) Your First Tailwind Website: a YouTube video on using TailWind CSS Node Auth Tutorial (JWT): a video series on authentication with Node.
Read more →

TIL About Adding a New Line to “git commit -m”

For Git messages I use git commit -m to add a headline to a git commit. So far, I’ve never used the detailed summary which you can add to a commit message. It was tooMuch of a hassle to open a text editor and add a detailed explanation. Today I learned that you can write a multi-line commit message with git commit -m. For example, in Bash: git commit -m 'my headline Here goes the detailed explanation of the commit ' Source:
Read more →