Just did my first professional TypeScript project

After 4-5 years with JavaScript (and loving it), I finally decided to give TypeScript a chance. Just coded a contract-based project with it. Both backend and frontend (react) were programmed in TypeScript. I should say that I have used typescript before on smaller one-to-three file size projects. It was mostly stuff like linear equation systems, matrix operations, basic sorting algorithms, etc. It makes you write better, quality code, and saves time....

December 26, 2021 · 1 min

How to pass socket.io to express routes in files?

Socket.io is a popular library used to enable live (real-time) communication across server and client(s). It uses events to receive to transmit data. We’ll be discussing how to use it with Express route files. We’ll be dealing with the new 3.x version of the socket.io, which is a bit different. You can have a look at this migration guide from 2.x to 3.0. Basically, we create a simple middleware: const { createServer } = require("http"); // you can use https as well const express = require("express"); const socketIo = require("socket....

February 13, 2021 · 2 min

How to Setup Https on Express Server Using Letsencrypt

Not having SSL these days just won’t do. After deploying my personal website, I couldn’t help but notice that Chrome and Safari were showing ’not secure’ in the address bar. Setting up SSL is quite easy on cPanels and many hosting providers provide free SSL options. It’s really just a couple of clicks and some wait time before you are ready to go. But, since we are working with Node and Express, things will be done differently....

January 23, 2020 · 3 min