Sometimes you need to zip folder or files in Node.js backend development. Jszip is for creating, reading and editing .zip files with JavaScript, with a lovely and simple API. See https://stuk.github.io/jszip for all the documentation.
How to simplify website localization using POEditor
When you make localization of website, you need language specific configuration files for the supported languages. POEditor is a useful SaaS service to make the configuration files easily. Using POEditor, you can build dictionary of the texts that are used in your website for each supported language. And can export them into a lot of …
Using Amplitude for Product & Web Analytics
What if you are looking for a product for web analytics but have a lot of events, a complicated product and sending more and more data over time. Sometimes it wouldn’t just work to go with Google Analytics (360), Adobe Analytics and maybe integrating your custom build solution or Snowplow might be too complicated for …
React-flow to build customizable flowcharts and diagrams
In some web applications, sometimes it is required to build node/edge based flow diagrams to describe the workflows, procedures as drag&drop and flexible/intuitive UI. React-flow is the library you are looking for. React-flow is most flexible and customizable. There is react-flow documentation and examples.
Artillery Load Testing Introduction
Artillery is a Node.js package designed for testing backend systems, such as APIs. Out of the box, it supports your standard HTTP APIs, along with protocols like WebSockets. It also integrates with the Socket.io library for Node.js applications. Artillery also sports a plugin interface to extend its functionality. An important distinction to make with Artillery is that it’s …
How to load Sequelize Database connection asynchronously
Sometimes, we need to load database connection configuration asynchronously (for example loading env values from 3rd party secret store). Sequalize doesn’t have such feature in the official documentation. But There is a possibility to use Sequelize.beforeConnecthook. You can initialize the Sequelize object with empty credentials and inside the beforeConnect hook, you can load the env …
How to load env variables using AWS Secrets Manager
For some secure web application, especially backend services requires high security protection. Most of our environment variables such as database credentials, API secrets etc are stored in .env file in most of web applications. But this can bring us a big security hole if the server is breached. Thus, nowadays some products wants to store …
Testing Lambda function locally
Lambda-local lets you test NodeJS Amazon Lambda functions on your local machine, by providing a simplistic API and command-line tool. npm install -g lambda-local A simple way you can run lambda functions locally, without the need to create any special template files (like Serverless plugin and SAM requires), just adding the parameter –watch. It will raise a http server listening to …
RabbitMQ as a Service
Have you ever had to setup RabbitMQ service for your project on your server? Sometimes, it might be hassle to setup and configure the RabbitMQ in your own server and there is a security concerns. There is a cloud based service called CloudAmqp. It’s very easy to setup free version in 5 mins and it …
Basic auth configuration for specific URL using Nginx.
When you want to secure specific URL or route, you can configure Basic auth using Nginx. First install apache2-utils as apt dependency. You can add usernames to .htpasswd by running the following command. The username we’ve chosen is alice, of course, change this to fit your requirements. Next, we’ll need to add a hashed password to the user …