sudo nano /etc/nginx/sites-available/subdomain.maindomain.in
server {
server_name subdomain.maindomain.in; # Replace with your domain
access_log /var/log/nginx/access.log;
| const express = require('express'); | |
| const cors = require('cors'); | |
| const app = express(); | |
| const env = require('dotenv').config().parsed; | |
| const fs = require('fs'); | |
| const pm2 = require("pm2"); |
| import { Injectable } from '@angular/core'; | |
| import Dexie, { Table } from 'dexie'; | |
| interface PostInterface { | |
| id?: number; | |
| name?: string; | |
| age?: number; | |
| date_of_birth?: string; | |
| } |
sudo nano /etc/nginx/sites-available/subdomain.maindomain.in
server {
server_name subdomain.maindomain.in; # Replace with your domain
access_log /var/log/nginx/access.log;
| const axios = require('axios'); | |
| const https = require('https'); | |
| const cheerio = require('cheerio'); | |
| const agent = new https.Agent({ | |
| rejectUnauthorized: false | |
| }); | |
| const init = async () => { | |
| const response = await axios.get(`https://sivabharathy.in`, { httpsAgent: agent }); |
In MongoDB, the $lookup stage is used in the aggregation pipeline to perform a left outer join between documents from two collections. This allows you to combine documents from one collection with documents from another based on a specified condition.
Here's an example of using $lookup in MongoDB, assuming you have two collections: orders and products. The goal is to retrieve information about orders along with details about the products they reference:
Suppose you have the following collections:
orders collection:[Those who want to become a Full Stack Developer their first choice is MEAN Stack because it has a lot of scopes and easy to learn as well but preparing is hard so Here's a Cheat Sheet - Inspired by The Technical Interview Cheat Sheet.md
This list is meant to be both a quick guide and reference for further research into these topics. It's basically a summary of important topics, there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
| // for global variables names we use the const/let keyword and UPPER_SNAKE_CASE | |
| let MUTABLE_GLOBAL = "mutable value" | |
| const GLOBAL_CONSTANT = "immutable value"; | |
| const CONFIG = { | |
| key: "value", | |
| }; | |
| // examples of UPPER_SNAKE_CASE convention in nodejs/javascript ecosystem | |
| // in javascript Math.PI module | |
| const PI = 3.141592653589793; |
| # emoji-data.txt | |
| # Date: 2019-01-15, 12:10:05 GMT | |
| # © 2019 Unicode®, Inc. | |
| # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. | |
| # For terms of use, see http://www.unicode.org/terms_of_use.html | |
| # | |
| # Emoji Data for UTS #51 | |
| # Version: 12.0 | |
| # | |
| # For documentation and usage, see http://www.unicode.org/reports/tr51 |
| var udp = require('dgram'); | |
| // --------------------creating a udp server -------------------- | |
| // creating a udp server | |
| var server = udp.createSocket('udp4'); | |
| // emits when any error occurs | |
| server.on('error',function(error){ | |
| console.log('Error: ' + error); |
| nearly every Linux distribution comes with systemd, which means forever, monit, PM2, etc. are no longer necessary - your OS already handles these tasks. | |
| Make a myapp.service file (replacing 'myapp' with your app's name, obviously): | |
| [Unit] | |
| Description=My app | |
| [Service] |