One of the essential practices of software development is version control, and with that, we also need to retain database compatibility with a specific version of our application.

Image for post
Image for post
Photo by Danil Sorokin on Unsplash

With each release, we should be able to do a fast, reliable database update without compromising existing data and have a possibility of rollback in case of the worst-case scenario.

In the Nodejs project, this can be achieved with different libraries like Sequelize and db-migrate, Knex …

Out of the three, Knex seems to be the most mature, which best fits the migration requirements.

Knex is multi-platform SQL query builder with built-in…


I know what crossed your mind straight away: why would you debug Nodejs in Docker ?!? :)

There should indeed be no need to debug an app in Docker. In a perfect world, it should be done in the development environment with your favourite IDE… But, the world is not perfect, and there will always be some environment-related issues that will require you to tackle the issue on the spot.

Let us take an example of running a Nodejs app inside of Docker container with ‘node-rest-API’ id. First, we will need to enter into the container with the following command…


Image for post
Image for post
Photo by Antoine Petitteville on Unsplash

A lot has been written about Docker networking, but there is not a lot of practical examples out there.
So I decided to try and make it a bit clearer and explain a couple of Docker networking examples in practice.

Note: this blog is referring to Docker version 19.03.13.

Quick Overview of Docker Networking

First, let us have a quick overview of Docker networking.
Docker has different networking drivers:

  • bridge: the default network driver,
  • host: for standalone containers,
  • overlay: used in Docker swarm,
  • macvlan: works on MAC addresses assigned to containers,
  • none: networking is disabled,
  • Network plugins: Third-party network plugins with Docker.

Here we will…


Image for post
Image for post

In the previous blog, Technical Search Engine Optimization, I described concepts and ways to achieve good Search Engine Optimization. In this blog, I will explain how to achieve that with Reactjs / Nextjs Server-Side Rendering (SSR).

For our POC, we will build a Blog web-app which will read the data from Node.js Rest API and pre-render React.js components with Next.js on the client-side. We will mainly focus on what solutions Nextjs provides us, so it is kind of expected you have a basic Javascript knowledge and are familiar with tools like npm.

You can have a look at the project


Image for post
Image for post

A lot has been written about blockchain, but there are very few examples of the technology in action. So to understand it best is to write your own


Image for post
Image for post

Search Engine Optimization (SEO) is changing and evolving every year. SEO concepts that used to work a couple of years ago might no longer be effective today.

Search engines change their algorithms quite frequently, and with new development trends, like Single Page Application (SPA), Progressive Web Apps (PWA), Accelerated Mobile Pages (AMP), API-First Approach (AFA) …, SEO becomes more complex. Additional considerations have to be kept in mind to achieve a good search engine rating, and additional development effort might be needed.

In this article, I will not be explaining details of how SEO works. Enough has been written about…

Patrik Bego

Code and Life Hacker

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store