Home
Khuong Dev
Cancel

Suppress Startup log in NestJS

Example // main.ts import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { bootstrapLogger } from './bootstrap-logger'; ... const app = await NestFactory....

Học Javascript qua các câu hỏi phỏng vấn

Cơ bản 1. Closure là gì? Closure là một dạng function nằm trong một function khác. Function bên trong có quyền truy cập vào scope (phạm vi) và các tham số của function bên ngoài ngay cả khi funct...

Install Git on Linux and Unix

Install Debian/Ubuntu For Ubuntu sudo add-apt-repository ppa:git-core/ppa sudo apt update sudo apt install git Alpine sudo apk add git References Download for Linux and Unix

Fetch API on Javascript

POST method async function postData(url = '', data = {}) { // Default options are marked with * const response = await fetch(url, { method: 'POST', // *GET, POST, PUT, DELETE, etc. mod...

Postman on Linux

Install Postman Install by Snap sudo snap install postman Uninstall Postman If you use Snap: sudo snap remove postman References Installing and updating

UUID in NodeJS

UUID (Universally Unique IDentifier) crypto - Module was added from Node.js 14.17.0 const crypto = require("crypto"); console.log(crypto.randomUUID()); uuid module: const uuid = require(...

UUID in Javascript

UUID (Universally Unique IDentifier) function uuid() { var temp_url = URL.createObjectURL(new Blob()); var uuid = temp_url.toString(); URL.revokeObjectURL(temp_url); return uuid.substr(uui...

Converting text to speech with Javascript

API Web Speech & Demo function speak (message) { var msg = new SpeechSynthesisUtterance(message) var voices = window.speechSynthesis.getVoices() msg.voice = voices[0] window.speech...

Javascript Array tips and tricks

1. Remove duplicates value from an array const languages = ['java', 'php', 'ruby', 'python', 'php', 'python']; console.log(languages); // First method const uniqueLangs = Array.from(new Set(langu...

Useful Docker & docker-compose commands

Docker Commonly used Docker commands Command Description docker version Show the docker version docker image ls or docker images ...