Unit1 Introduction To Mean Stack
Unit1 Introduction To Mean Stack
Unit1 Introduction To Mean Stack
3) Time-Saver
The main reason is that you don’t have to create any modules from scratch because you already
have Node.js with its huge collection of module libraries.
Additionally, the automatic testing feature sends a notification when a particular feature has an
error, so you can correct it before moving on.
5) Highly flexible
You can test your app even during the development process, and host it on the cloud. And if you
want to add new information any time in the future, just a new field to add in the form, and its
done.
6) Cloud compatible
The M in MEAN stack is the reason for cloud compatibility. If your app needs to implement cloud
functionalities, then MongoDB is the ideal solution. It lets you develop, test and deploy those
functionalities with ease.
2) Express(.js)
✓ It provides easy routing of requests based on HTTP methos and URL
✓ It allows to set up middleware to response to HTTP requests.
✓ It allows dynamically render the HTML Page by passing arguments to templates.
3) Angular(.js)
✓ Angular is typescript based free and open-source single page and web application framework
✓ It is component-based framework for building web app.
✓ A collection of well integrated libraries that covers a wide variety of features, including
routing, form management, client server communication and more.
4) Node(.js)
✓ Node allows us to run JavaScript on the server.
✓ It is free and open source
✓ Node runs single threaded non blocking asynchronous programming which is very memory
efficient.
✓ Node used in single page application, API, I/O bound apps, high scalable and real time apps.
Installing and Configuring the MEAN Stack:
1) Install Advanced text editor to make change in our application Visual Studio Code
(VSCode)
Step 1: Visit the Official Website of the Visual Studio Code https://code.visualstudio.com
using any web browser like Google Chrome, Microsoft Edge, etc.
Step 2: Press the “Download for Windows” button on the website to start the download of the
Visual Studio Code Application.
Step 3: When the download finishes, then the Visual Studio Code Icon appears in the downloads
folder.
Step 4: Click on the Installer icon to start the installation process of the Visual Studio Code.
Step 5: After the Installer opens, it will ask you to accept the terms and conditions of the Visual
Studio Code. Click on I accept the agreement and then click the Next button.
Step 6: Choose the location data for running the Visual Studio Code. It will then ask you to
browse the location. Then click on the Next button.
Step 7: Then it will ask to begin the installation setup. Click on the Install button.
Step 8: After clicking on Install, it will take about 1 minute to install the Visual Studio Code on
your device.
Step 9: After the Installation setup for Visual Studio Code is finished, it will show a window
like this below. Tick the “Launch Visual Studio Code” checkbox and then click Next.
Step 10: After the previous step, the Visual Studio Code window opens successfully.
Now you can create a new file in the Visual Studio Code window and choose a language
of yours to begin your programming journey!
2. ng new FirstAngularApp
In this step, you will create an Angular application.
You will see a question - Would you like to add angular routing? Enter 'Y' to add a routing
module to the application.
The next question will be - Which StyleSheet format would you like to use? Select CSS by arrow
keys and press enter.
This will take few minutes to install all required dependencies, once it is done you should be able
to compile and execute FirstAngularApp application.
3. Launch FirstAngularApp
Now your application is ready with default configuration, Angular Component, Angular
directives, modules. Using below command you will navigate to application directory.
cd FirstAngularApp
Following Angular CLI command will launch your application in your default browser. Execute
this command in the terminal.
ng serve
How To Fix Error PS1 Can Not Be Loaded Because Running Scripts Is Disabled On This
System In Angular
set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Install Bootstrap:
npm install bootstrap
Install express:
npm install express