Use Global Node Modules in Normal Nodejs App/Script

If you’re developing a small node script based on global node_module that you have installed, Once you import or require that particular node_module, You will see that Node.JS runtime will throw error module not found error, It is basically because your Node app doesn’t have access to globally installed node_modules, but thanks to vibrant Node.js … Read more

Fix HPE_INVALID_METHOD Error in Node.JS (Hapi/Fastify/Express)

Node.JS images, logo

When You’re Making HTTP request in Node.JS Server Written In Node.JS Rest API Frameworks such Express.js, Hapi.js, Fastify.js and Many more, Suddenly, you encounter error “parse Error: Invalid method encountered”, “stack”: Error: Parse Error: Invalid method encountered “bytesParsed”: 0, “code”: “HPE_INVALID_METHOD””, Don’t Panic it’s very not any programming mistake, rather simple typo mistake. Fix:What you’re … Read more

Find the host’s cloud provider using Node.Js

If you ever wanted to inject or use cloud provider-specific code in the codebase or DevOps work, You can now do it very easily thanks to cloud-detect-js(https://github.com/vithalreddy/cloud-detect-js#readme) Node.js Module, which helps to determine host machine’s cloud provider using machine’s file system and metadata. Detect Host’s Cloud Provider This Module Provides a very simple API as … Read more

Inverse of pandas json_normalize or json_denormalize – python pandas

As we all know pandas “json_normalize” which works great in taking a JSON Data, however, nested it is and convert’s it to the usable pandas dataframe. pandas json_normalize documentation Now If you want the reverse operation which takes that same Dataframe and convert back to originals JSON format, for example: for pushing data to elastic … Read more

Installing Nix in WSL Ubuntu

If Try to install Nix package Manager on Window Subsystem for Linux or WSL, it throws some cryptic error messages, But There is work around for installing Nix On WSL Ubuntu or any other Distro. This Errors in WSL due to limited support to sandbox apis in WSL.   Steps to install Nix Package Manager … Read more

How to run shell script file or command using Nodejs?

nodejs npm

If you ever wanted to run some automation script or file in your Unix/Linux machine using nodejs? It may be to build your binaries from source code or for some tooling in your dev workflow. Nodejs Provides well-matured APIs for doing these operations and there are plenty of npm modules to ease the pain creating … Read more

Receive Inbound emails using Node.js – Node-Mailin

If you’re setting up, CRM or any Web app and want to receive emails to your domain dynamically without having to setup mail account for every domain subdomain and username, Then you can use this following NPM Module to do so. Node-Mailin Node-Mailin – Receive Emails Node-Mailin is an SMTP server that listens for emails, parses them … Read more