(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
We're going to generate a key per project which includes multiple fully qualified domains. This key can be checked into the project repo as it's intended for local development but never used on production servers.
Save ssl.conf to your my_project directory.
Open ssl.conf in a text editor.
Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.
We're going to generate a key per project which includes multiple fully qualified domains. This key can be checked into the project repo as it's intended for local development but never used on production servers.
Save ssl.conf to your my_project directory.
Open ssl.conf in a text editor.
Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.
My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.
Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
| #!/bin/bash | |
| # https://www.nginx.com/resources/wiki/start/topics/tutorials/install/ | |
| # Switch to root | |
| sudo su | |
| # Add the mainline release | |
| echo "deb http://nginx.org/packages/mainline/ubuntu/ xenial nginx | |
| deb-src http://nginx.org/packages/mainline/ubuntu/ xenial nginx" > /etc/apt/sources.list.d/nginx.list |
Transforming elements can be interesting if you're a library author, but can also be very valuable when writing components to abstract behaviour in your existing code base.
To get a better understanding, we will walkthrough the most important React Top Level API transformation functionalities. React offers a couple of helper functions that we can leverage when for creating and adapting elements, further information is available via the official React documentation.
| # | |
| # Building V8 for alpine is a real pain. We have to compile from source, because it has to be | |
| # linked against musl, and we also have to recompile some of the build tools as the official | |
| # build workflow tends to assume glibc by including vendored tools that link against it. | |
| # | |
| # The general strategy is this: | |
| # | |
| # 1. Build GN for alpine (this is a build dependency) | |
| # 2. Use depot_tools to fetch the V8 source and dependencies (needs glibc) | |
| # 3. Build V8 for alpine |
| RUN apt update | |
| RUN apt upgrade -y | |
| RUN apt install -y apt-utils | |
| RUN a2enmod rewrite | |
| RUN apt install -y libmcrypt-dev | |
| RUN docker-php-ext-install mcrypt | |
| RUN apt install -y libicu-dev | |
| RUN docker-php-ext-install -j$(nproc) intl | |
| RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
| RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |