In this guide we are going to:

  • install the latest NGINX version in Ubuntu 16.04.1
  • understand configuration files
  • generate SSL certificates and configure them in NGINX
  • configure NGINX as reverse proxy

NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. We use it in the #codingmarks project as web server to serve static files and as a reverse proxy for the NodeJS API and Keycloak Server:

Network Diagram

Continue Reading ...

Last week I migrated the codingmarks project to use Angular CLI and it’s awesome. Initially it was based on Angular Seed with Webpack - preboot/angular-webpack. I couldn’t take the update breaking changes pain anymore when I wanted to add Ahead-Of-Time compilation1 support. My webpack2 configuration was also getting out of hand. But I did it, I moved it to Angular CLI and in this post I am going to list the major steps I had to take. It is based on the Moving your project to Angular CLI story with my own needs and flavor added to it.

Continue Reading ...

As I have told you before, I am really hooked on bash aliases1. This blog entry emphasizes that point and presents how to make a MySql database backup via mysqldump with only three words, even with three letters, if you will.

So, without further ado, let’s see the alias:


$ alias mysql-backup-db_name='mysqldump db_name -u db_user -p -h 127.0.0.1 --port 3306 --single-transaction > path_to_back_up_directory/db_name_$(date "+%Y-%m-%d_%H:%M").sql'
$ mysql-backup-db_name

or, same with three letters:


$ alias mbd='mysqldump db_name -u db_user -p -h 127.0.0.1 --port 3306 --single-transaction > path_to_back_up_directory/db_name_$(date "+%Y-%m-%d_%H:%M").sql'
$ mbd
Continue Reading ...

When I add a new bookmark to my bookmarks collection, I set the title of the new bookmark, most of the time, the same as the title of the web page being bookmark - I assume the authors have put some thought into it. To make this happen automatically, I am using a technique called web scraping1. I cannot do it in front end (angular), since most of the URLs are outside of the https://bookmarks.codingpedia.org/ domain. So the magic happens in back end, in NodeJS, with the help of a library called cheerio2, thank you Matthew for that. Cheerio is a fast, flexible, and lean implementation of core jQuery3 designed specifically for the server. Read on to learn how this works.

Octocat Source code for bookmarks.codingpedia.org is available on Github - frontend and backend.

Continue Reading ...

When managing my coding bookmarks via bookmarks.codingpedia.org, I often have the need to place in the bookmark’s description either a code snippet (might be a command), add a list or add links and emphasize words - this seems like a perfect match for Markdown1. In this post I will demonstrate how I enabled Markdown support with the help of ShodownJS2, both in front end (developed with Angular3) and in backend, developed with NodeJS4.

Octocat Source code for bookmarks.codingpedia.org is available on Github - frontend and backend.

Continue Reading ...