Posts

Showing posts from May, 2023

MongoDB Mongoose Use Lookup Guide

Image
In This Blog We Will See Complete Guide For Using Joins With Lookup in Mongoose MongoDB Mongoose - Education Funda Simply in MongoDB Mongoose we can use Aggregate Query with $ lookup to get data basis upon JOINS. such as below: await MainModel . aggregate ([ { $match : { "COLUMN_NAME" : value } }, { $lookup : { from : 'relation_collection_name' , localField : 'relation_collection_primary_key' , foreignField : 'this_table_foreign_key' , as : 'ALIASING' } } ]); With above query new column added with ALIASING in which relation collection data will also come. To get data in Object format instead of Array we can use $unwind like below: await MainModel . aggregate ([ { $match : { "COLUMN_NAME" : value } }, { $lookup : { from : 'relation_collection_name' ,

Create and Deploy AWS SAM Application

Image
How To Create and Deploy Your First Lambda Function on AWS Serverless Application Modal AWS SAM - Education Funda Create Your SAM Application Software Requirements: AWS CLI ( Reference Link ) SAM CLI ( Reference Link ) Docker ( Reference Link ) AWS Serverless Architecture - Education Funda Now All Will Happen With Command Line Interface Now open Terminal and Go to your directory in which you want to create your project. $ sam init  #hit enter this command ~ This will appear 2 option, 1 AWS Quick Start and 2 Custom Template For making things simple you can 1 at moment. ~ Now you need to select template, at moment you can select Hello World Example. ~ Now it will ask for programming language Python by default and you can select other as well such as Node.js, Java, etc. ~ Now you can choose ZIP option. ~ Now it will ask starter template, you can select anyone from that Hello World Example. ~ X-Ray tracing you can enable so select Y. ~ Enable Cloud Watch now with select Y. ~ Now it ask