Full Stack Development with MongoDB Covers Backend, Frontend, APIs, and Mobile App Development Using PHP, NodeJS, ExpressJS, Python and React Native Manu Sharma www.bpbonline.com FIRST EDITION 2022 Copyright © BPB Publications, India ISBN: 978-93-55510-143 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. www.bpbonline.com Dedicated to All Family and Friends My Grandmother: Smt. Pushpa Devi Sharma My Parents: Sh. Vijay Sharma and Smt. Neelam Sharma My Wife: Anu Sharma My Sister: Neha Sharma & Especially to My Angel Daughter: Siya Sharma About the Author Manu Sharma (MPhil) has more than 17 years of industry experience in software development at the architect level, web administration, project management and execution, product development, and team management. He has worked for various multinational companies, small to mid-sized organizations, universities as well as one of the biggest conglomerates of India. He is also the founder, architect, and developer of two open-source projects. In his free time, he loves to spend his time with his family and his daughter. His other interests are singing and arts. During some weekends you can find him singing and recording music in the studios, playing the flute, or painting with brushes in his hands. About the Reviewers Dheeraj Chhabra is a Strategic-level professional working as Program Director in Happiest Minds Technologies Limited. He holds Masters in Computer Applications (MCA) from Indira Gandhi National Open University (IGNOU). Dheeraj has more than 18 years of work experience in IT and has worked in different established organizations at various levels from Software Developer to Program Management. He has worked on various technologies including Java Swings, Servlets, JSP, EJB, Asp, VB.Net, C#.Net, ASP.Net, SQL Server, Oracle, and more. He has played various important roles including, but not limited to, Software Engineer, Team Lead, Project Lead, Project Manager, Enterprise Solution Architect, Product Manager, and Program Manager. Dheeraj is a firm believer as well as a strong follower of Servant Leadership, Empowerment, and Continuous Integrated Development. Dheeraj has earned various certifications such as PSM, TOGAF, PMP, PMI- ACP, SAFe 4 & 5, EXIN ASM, and is currently following his passion of continuous learning and development focused on a couple of more technical and leadership skills-oriented certifications. He is detail-oriented with a key focus on end-to-end project/program planning, execution, and delivery. He keeps a close eye to Run, Protect and Change the business. Rohit Agarwal is an IT professional with rich experience in Data Technologies. His expertise circle around Data Engineering, Architecture, and Analytics providing end-to-end solutions to business units by creating data pipelines and building business intelligence systems to help organizations take critical business decisions based on data. He earned his Master’s degree in Information Systems from Northeastern University, Boston in the year 2017. He has a keen interest in Entrepreneurship and Innovation and has also learned the same from Harvard Extension School, Boston. Mamoon Mushtaque is a technically accomplished IT professional with 9+ years of experience in service-based as well as product-based organizations with insightful experience in various aspects of UI development using multiple technologies. He is currently working as Lead Software Engineer at Spiralyze LLC. Harish Kumar Buttolia has an M.Sc. (IT) from the Punjab Technical University. He worked for various Government and Private organizations. He possesses 18 years of experience in IT with a good knowledge of software and application development using open source technologies. He is having articles/publications published in renowned India/International Journals. He is always keen to learn new technologies. He is also interested in writing, reading, music, and travel. Acknowledgement First of all, I am thankful to almighty God for providing me with the opportunity to write a book. I am very thankful to Mr. Nrip Jain (Head, Business Development Group, BPB Publications) for believing in me and offering me to write this book. I am also thankful to all my Gurus and Teachers in life for their teachings and blessings. My special thanks to my daughter “Siya” for supporting me during the book journey. I feel great to have some friends; most of them are still in touch with me including my college buddies, from ET&T as well as a few other friends – Chandrashekhar Kalia, Kapil Bharadwaj, Ankur Sood, Anugrag Sharma, Suresh Kumar, Umang Mathur, Nisha Jayna, Deepak Kumar Taank, Dhirendra Kumar, Joseph Vamsavardhan Gurja - Thank You All I am very thankful to my uncle and neighbor – Prof. Jyoti Kumar Sharma for his guidance while I was about to start writing my first book and for encouraging me always. I would like to thank few of my colleagues from my present organization (Spiralyze LLC) for their support, admiration, and appreciation: Gajan Retnasaba, Yaseen Shaik, Sophie D’Souza, Dheeraj Sareen, Mitko Cabevski, Hassan Ahmad, Mamoon Mushtaque, Nikunjkumar Balar, Yuriy Kycha-Kolot, Bhavesh Vavadiya, Dhaval Balar, Sohil Hunani, Riyaz Lohiya, Jaya Prakash, Mohammad Subhani, Vaibhav Anchal, Kushal Borda, Abhishek Mohata, Himujjal Upadhyaya, Sonu Rana, Sergy Babich, Donatas Jasiunas, Cris Balano, Bash Simplicio, Rachelle Olvida, Sonali Rasane, Angelica Marbella, Quirino Lacambra IV – You people are awesome! I would like to also thank a few people from my previous organizations: Rajesh Goyal, Santosh Kumar (@ Infopro) Amit Kumar Sen, Shahid Reza, Paarul Madaan, Sachin Chandra, Santosh Negi, Sandeep Kumar, Sunil Patnaik, Nishant Singh, Aniruddha Ratnaparkhi, Manish Singh, Sandeep Sugra (@ Shri Ram New Horizons) Anupam Srivastava, Rohit Agarwal, Daljeet Singh, Ashok Kumar, Abhishek Kumar, Ajay Kumar, Puneet Sehgal, Vikrant Singh, Abhishek Verma, Aarfi Siddique, Deepak Gautam, Naveen Jeengar, Randhir Sharma, Sushil Kumar Prajapati, Priyanshu Singh, Jyoti Deep (@ Miracle Corporate Solutions Pvt. Ltd. ) Shiw Kumar Prasad, Vidushi Sasan, Yashdeep Gupta, Gaurav Mukhija (JBi Digital) Amit Puri, Dhananjay Kumar Yadav, Dheeraj Yadav, Rahul Singh Yadav, Amitesh Maurya, Saurabh Sharma (@TSI India) My gratitude also goes to the entire team at BPB Publications for being always supportive during the entire Book Journey and whenever I need their help they were always available to help me. Last but not least I am very thankful to all the technical reviewers of this book, I really appreciate their hard work during technical review and am thankful to them whenever they have corrected me in some places which required changes.