I found myself lately adding more StackOverflow questions to my dev bookmarks collection, so I took the challenge over the weekend to make this experience more pleasant. In this blog post I will present you the result - improve auto completion of bookmark attributes on creation, login with Stackoverflow account and visual hinting for stackoverflow bookmarks.
Cleaner code in an Express REST API with unified error handling
What started out as a simple code duplication removal, turned out into a major refactoring with complete rewriting of error handling, moving of business logic/db access into separate service files (about this in another blog post) and rewriting of all integration tests to use async/await. In this blog post I will focus on the custom error handling and how it made the code much cleaner for the REST API supporting www.codever.dev. The API uses ExpressJS, currently in version 4.
How to embed a youtube video in an angular material dialog
It’s easy now to recognise the youtube video bookmarks on www.codever.dev, by placing the youtube logo before the title of the bookmark:
Also, when you click on the youtube logo, a dialog will pop where the video is embedded and you can play it directly there. In this blog post I will show how it is implemented.
As a reminder, the www.codever.dev website uses Angular, with angular material and bootstrap for styling.
A cleaner multi-stage continuous deployment on Kubernetes of a Create React App with kustomize, helm and skaffold
Most applications depend on external factors that have different values depending on the environment where they are deployed. We mostly use for that environment variables. Guess what? Most of React Apps also have this need. In this blog posts presents a clean(er) way to make a multi-stage deployment of a Create React App on a Kubernetes Cluster. You can use this approach for a seamless integration into your continuous deployment pipeline.
In the beginning it will you show how to set up the React App and then guide you through several deployment possibilities on Kubernetes. You will deploy with
kubectl commands, with helm, with kustomize and in the end use skaffold.
The example app displays the latest public bookmarks published on www.codever.dev. Depending on the environment the app is built for, it will display the environment name in the navigation bar and the header’s color is different.
The source code is available on Github
Create a config.js file where you inject the environment variables in the
window object (e.g. window.REACT_APP_API_URL=’https://www.codever.dev/api/public/bookmarks’).
Add this file to the public folder of your react application. Dockerize the react application and at Kubernetes deployment time overwrite the config.js file in the
container - you can do that with Kubernetes configMaps via native kubectl commands, kustomize or helm.
Discover a collection of more than 10k curated dev bookmarks
All of these dev resources are personally curated or by the users who submitted them - thank you very much for your contributions. The rest are imported from the collections.