Posted on

Building Scalable Web Services in Golang

gophers learning

  One of the very intrinsic aspects of the language is its insistence on doing things the “right” way. From the way golang projects are structured to the strictness in linting and documentation, every single aspect of Golang, done right, is delightfully intuitive and ergonomic. Source: Building Scalable Web Services in Golang – Myntra Engineering – Medium The above post has some very good points about building web services in Go. Here is one of mine. Configuration…

Read more

Posted on

Docker Volumes: An Introduction

Docker volume

Docker volumes are very useful when we need to persist data in Docker containers or share data between containers. Docker volumes are important because when a Docker container is destroyed, it’s entire file system is destroyed too. So if we want to keep this data in some way, it is necessary that we use Docker volumes. Docker volumes are attached to containers during a docker run command by using the -v flag When Docker Volumes…

Read more

Posted on

Understanding Docker Containers

Docker container

In a previous article, we talked about Docker images but we could only use a small section to talk about Docker containers. Now, let’s go deeper. Docker Containers A Docker container is created from a Docker image. If a Docker image is a recipe, think of the Docker container as the dish that is prepared A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run…

Read more

Posted on

Working Effectively with Docker Images

Docker Images

Docker is a wonderful tool for many things. A few of them are; As a version control system for your entire app’s operating system by storing each configuration as a central build. To distribute/collaborate our app’s operating system with our team. To run your code on your laptop in the same environment as you have on your server. We are going to explore Docker images. Why we should use them, and how to go about…

Read more

Posted on

How to Add Google’s Two Factor Authentication to Laravel

Two factor authentication (2FA) strengthens access security by requiring two methods (also referred to as factors) to verify your identity. Two factor authentication protects against phishing, social engineering and password brute force attacks and secures your logins from attackers exploiting weak or stolen credentials. In this tutorial, we are going to learn how to add two factor authentication to our Laravel application. We’ll be using Google Authenticator and implementing the Time-based One-time Password (TOTP) algorithm…

Read more

Posted on

Using Laravel Mix with Webpack for All Your Assets

Laravel Mix provides a fluent API for defining Webpack build steps for your application using several common CSS and JavaScript pre-processors. The lovely creators of Laravel Mix, put in the common webpack configurations and you can add more custom configurations if you wish. This is especially wonderful for people that want to use webpack, but feel like configuring webpack is too difficult. Or maybe they wanted to use ES2016 but saw some complicated article about…

Read more

Posted on

Easy and powerful reverse proxy and load balancing with Docker

nginx reverse proxy

I build a lot of websites, and I run them in Docker containers. What happens is, I end up with URLs like this 0.0.0.0:1234. This is a problem because, They are difficult to remember Do not allow sub-domains. Bad for password managers My initial solution was to add a reverse proxy with Nginx so I have virtual hosts that point to my containers. However, this means I was writing the same Nginx configuration, over and over…

Read more

Posted on

How to create an autocomplete input with plain Javascript

Now, most people who have built websites have included forms. Regular text elements, number, select (dropdown), checkboxes and radio buttons. The problem A situation I’ve often encountered is where we need the user to choose from a very long list of options. The easiest thing to do is to put all the options into a select element. However, this is impractical because… It can make for a very terrible user experience If all the options…

Read more

Posted on

How to build a multi tenant site with Laravel ― Scotch

laravel multi-tenant site

Laravel is a wonderful framework, however the default settings make it difficult to use for more than one domain at the same time. A multi tenant site is one that uses the same codebase to serve data to multiple clients. A very popular example of this is slack. A multi tenant site will usually require that each tenant accesses the site from a unique url, and this causes problems because laravel by default, does not…

Read more