Category: nodejs

  • How to auto-start electron applications on startup

    I was developing an electron application that required to auto-start when the computer is booted and started up and it had to be cross-platform and automatic. So when the computer starts the program should run and there should be no setup required, once the user launches the application it should auto-start upon login. To solve […]

  • 5 Most useful ES6+ Features

    In this post, I am going to share with you Javascript ES6+ features that I find the most useful: For…of Loop Arrow Functions Async and Await Template literals Destructing For…of Loop Before either we had to write a full for loop or call the forEach function on the array to iterate over its item. Previously we […]

  • Embedding Rocket Chat using iFrame Auth

    Recently I was working on a project where I had to embed Rocket.chat on a website, and when the user login to the website, they will also get automatically logged-into Rocket.chat The following steps have to be performed: Check if the user exists in Rocket.chat If the user exists then login user If the user […]

  • How to setup multi-domain SSL in Node.JS using letsencrypt-express/greenlock-express

    How to setup multi-domain SSL in Node.JS using letsencrypt-express/greenlock-express

    Updated (14/June/2019) Updated (22/June/2018): Support for Let’s Encrypt v2 I have updated the code snippet below to include the support for Let’s Encrypt v2 in the snippet below: /** * Setting up https */ var lex = require(‘greenlock-express’).create({ server: ‘https://acme-v02.api.letsencrypt.org/directory’, // Let’s Encrypt v2 is ACME draft 11 version: ‘draft-11’, challenges: { ‘http-01’: require(‘le-challenge-fs’).create({ webrootPath: […]

  • Using Postgres with Parse Backend

    Facebook killed parse last year, but thankfully they Open-Source the parse backend. Initially, the Parse Backend only supported MongoDB database, but later support for  Postgres has been added by the contributor from the community. So using Postgres with Parse Backend is really quite simple, you just have to install the latest version of Parse Backend, […]

  • Introduction to SalisJS

    I was looking for a Node.JS web framework for my project, and in my quest for finding the best framework, I stumbled across Sails.JS, and I have been using it for a few months now and it is pretty awesome at most of the part, so if you need something like Rails for Node.js, Sails […]

  • Building command line apps in Node.js

    Node.js is becoming very popular platform for creating command line utilities, so I am writing this blog post to help you get started. Creating an executable script To create an executable script you will have to add shebang at the top of the script. E.g: #!/usr/bin/env node console.log(“First program”); Assuming you are on a UNIX […]

  • Executing tasks (functions) on specific dates in Node.js

    Sometimes you want to execute task after certain interval, I am not talking about executing a task after every 5 minutes, but after certain days; say every Monday at 5pm more like corn jobs. If you are looking for a library which allows you to execute arbitrary functions at specific dates, so you’re in luck […]

  • PeerJS How does it work?

    I was very excited about the latest Web RTC API’s on Peer-To-Peer video calling and file transfer, and when I reading about these new API’s I came accorss a awesome javascirpt plugin PeerJS, which allows to use the p2p data transfer easily. I decided to use it for my screensharing app deadsimplescreensharing, becuase I am […]