Build NestJS Library
To build a NestJS library, you can follow these steps: Create a new NestJS project using the NestJS CLI: Change the working directory to your library folder: Create a new library module using the NestJS CLI: This will generate a new folder my-library inside the src folder. This folder contains the library module and its…
MongoDB error: child process failed, exited with error number
Check all path in /etc/mongod.conf. If files or folders not exist, create them then:
Compare strings and calculate scores, find the closest string
Compare strings and calculate scores, find the closest string by JS:
Store compressed data in MongoDB and decompress it
Storing compressed data in MongoDB and decompressing it is a necessary task when you store large data files like Logs. Database schema Interface Upload Controller Method: POST – ‘multipart/form-data‘ Field name: file Type: Use .zip file for lightweight Allows to use multiple text files in a zip file Upload Service Input: file Extract the zip…
NGINX – Installation and configuration
It’s easy to install NGINX from the repo. For example on RHEL/ Centos/ Rocky Linux: So, this tutorial I want to show you how to install from source. You can read something here for NGINX and streaming: [Full install] Streaming HLS with Nginx & FFMPEG (quicktricks.net). Or below: Preparing for the installation Install some required…
MongoServerError: Plan executor error during findAndModify :: caused by :: E11000 duplicate key error collection [Solved]
Tips for “MongoServerError: Plan executor error during findAndModify :: caused by :: E11000 duplicate key error collection“. Mongo duplicate when findAndModify(), same for findOneAndUpdate() Don’t try to query the dynamic field with the upsert option! The same problem will occur when querying multiple conditions (include some not unique fields), while turn on option upsert=true. This…
[Full install] Streaming HLS with Nginx & FFMPEG
This guide for Centos/ RHEL/ Rocky Linux,… So, you can use for other Linux. Install some required packages Install NGINX from source Download some required packages: ZLIB: Find lastest version here: https://zlib.net/ My version is https://zlib.net/zlib-1.2.12.tar.gz PCRE Find lastest version here: https://www.pcre.org/ or https://sourceforge.net/projects/pcre/files/pcre2/ My version is pcre2-10.37.tar.gz OPEN SSL Find lastest version here: https://www.openssl.org/source/…