Africoder's Technical Blog

  • August, 2020
  • Run node.js on your apache server (localhost or live server) with standard url e.g. or

    Step 1: ensure that you have enabled mox_proxy and mod_proxy_http on your apache server
    LoadModule proxy_module modules/
    LoadModule proxy_http_module modules/

    If you are on debian, do:

    sudo a2enmod proxy proxy_http

    Step 2: 

    Create a hosts file like this on apache:

    <VirtualHost *:80>
    ProxyRequests On
    ProxyPass / http://localhost:3000
    ProxyPassReverse / http://localhost:3000

    Restart your apache and launch 

    Read More

  • Apache Self-Signed Certificates

    You need to run this on the commandline:

    $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout holladocs.key -out holladocs.crt

    The common name should be your virtual domain name. This post will be continued later.

  • SocketIO - App structure and architecture

    SocketIO is a JavaScript library that makes the lives of developers so easier when dealing with web socket and socket programming. This is the fact that SocketIO has abstracted out all the low level and tedious steps that are associated with setting up a socket server and client; it has made the question of programmers to be “How can I structure my application.”

    Whilst I have done different types of socket implementations, I will walk us through a setup that has always work for me and has proven to be the best in cases that I have had to use SocketIO.

    In this post, we will be implementing a basic SocketIO server, setup a small database for our users, have a client that consumes our application.

    It will never be as boring as you think, I promise.

    Read More

  • Dockerized Node/Nginx, MongoDB, Redis app setup

    Docker is an app development tool that eases the process of creating, running, and deploying applications. It uses the concept of containers which work just like a Virtual Machine does.

    While Docker runs more like a Virtual Machine does, it is more advantageous than a VM.

    It let us define OS-like images like we are writing an actual OS that includes the only tools that we need, aside this, Docker utilizes the concept of layers which makes its images very much extensible. With this little feature, developers, sysadmins and devops engineers prefer it more. And since it has been in existence, Docker has witnessed widespread usages making it one of the defacto tool for software development, testing and delivery.

    While there are many low level details about Docker which we won’t be doing in this post. In this post, we will focus on creating a docker compose file that could ease the development and deployment of NodeJS based web applications which require an nginx server which acts as a proxy server to a NodeJS application, MongoDB as the database and Redis as its dependencies.

    Read More

Page 1 of 1, totaling 4 entries