
Welcome to this course! Let me introduce myself and give you a first overview of the course content.
What does "MEAN" stand for? Let's explore the different pieces (MongoDB, Express, Angular & Node.js) that make up the MEAN stack and let's see WHY we combine them.
Learning alone is absolutely fine but finding learning partners might be a nice thing, too. Our learning community is a great place to learn and grow together - of course it's 100% free and optional!
First things first: In order to fully understand the idea behind a MEAN app, we need to understand what a SPA (Single Page Application) is.
So what's the big picture of the MEAN stack? How do the different things work together? Time for a closer look!
Let's get started and let's install the core tools we need to build MEAN applications!
To write code efficiently, an IDE is required - here's my recommendation.
For our MEAN application, we'll have a certain project structure. In this lecture, I'll introduce to that project structure and explain why we use it.
We have a good idea of what the MEAN stack is about - but what's in this course? This lecture gives you an overview of the course content and the order in which it is presented.
Your learning success is important to me! Here are some best practices on how to use the course materials.
Implement Angular event binding to capture input from a text area and trigger an onAddPost method on the Save Post button.
Explore getting user input in Angular with local references like postInput, read the value from input or textarea, and enable two-way binding using ngModel and FormsModule.
Learn to build a post-list component in Angular that outputs posts using Material expansion panels and an accordion, wiring it into the app module and styling 80% width.
Use structural directives like ngFor and ngIf to render a dynamic list of posts as expandable panels. Show a no-post placeholder and apply material typography for a clean, centered UI.
Create posts by adding a title and content, emit a postCreated event with EventEmitter, and bind the post to the parent using input and output to update the list.
Implement Angular forms with the forms module, ngModel, and template-driven approach to capture title and content, add HTML5 validations, and display dynamic error messages.
Learn to fetch and update posts in Angular using ngOnInit, a PostService, and RxJS subjects, subscribing to post updates and preventing memory leaks with ngOnDestroy.
Polish the Angular Material form by adding placeholders for labels, enable a floating label, reset the form with resetForm to reset values and validity, and prepare an edit/delete action bar.
Explore connecting a Node Express backend with an Angular app, using either a single server or separate static hosting, and implement RESTful APIs and routing.
Learn how to build a restful api with Node.js, defining stateless endpoints and json data exchanges using http verbs for a single-page Angular app and other clients.
Add express to a Node.js project, create an express app with middleware, establish routes, export and wire it to a server, and test with hello from express.
Improve the server.js by adding error handling and clearer output. Enable live reloading with nodemon and configure a valid port while adding a route to fetch initial posts.
Fetch posts from a node backend in an angular app by creating an express route /api/posts that returns a json object with a message and a posts array.
MongoDB is a NoSQL database that stores documents in collections, with documents like records and collections like tables, offering a flexible schema and easy Node/Express integration in the MEAN stack.
Compare NoSQL and SQL databases, focusing on schemas, documents, and relations, with MongoDB in the MEAN stack, and identify where each approach shines for logs, orders, and shopping carts.
Set up a MongoDB database using a cloud sandbox and connect it to your Angular Node Express app, configure users and IP whitelists for secure access.
Install mongoose, connect your node express app to MongoDB, and define schemas to store and fetch posts, enabling structured data in your MEAN stack project.
Connect our node express app to a MongoDB database using mongoose, import mongoose, and manage the connection with a promise to log success or handle errors.
Save a post with mongoose's save method to automatically insert a new document into the node angular database, creating the posts collection and object id.
Finish the edit feature by prepopulating the form with a post using template-driven ngModel, and implement a put update route with updateOne in MongoDB.
Update posts on the server and reflect changes locally by immutably replacing the post in the array, then fetch the post by id with a dedicated get-post route.
Organize the backend by moving post routes into a dedicated routes/posts.js file using express router, export the router, and mount it in app.js via app.use with the api posts path.
Validate image uploads by building a mime-type validator in Angular, reading the file as an array buffer, and exposing an async validator via RxJS observables.
Finish the image validator by reading file bytes with a Uint8Array to infer mime type, validate against PNG or JPEG, and wire an Angular async validator with form previews.
Implement server-side file upload with Multer in Express by configuring disk storage, destination and filename, validating mime types, and applying Multer as a post route middleware for a single image.
Add an image path to the post model and store the uploaded file's url on the server using Multer, then return posts with image paths to the client.
Bind the post image path in the post-list component to display images, then enable static access to backend images folder with express static and path.join, styling at 100% width.
Finalize the module by implementing file upload with a stylish picker, mime-type validation, and server handling, plus support for old paths or new file re-uploads to improve the app.
Implement an Angular Material paginator to control posts per page, bind total posts and page size, and handle page events to update the display.
Implement backend pagination for posts using query parameters page size and page. Use mongoose skip and limit to return the correct slice of posts.
Connect angular to the backend and fetch posts with a paginated get posts method using page size and page. Use template literals to build queries and initialize on page one.
Improve front-end pagination by showing a loading spinner during page changes, conditionally render the page-nator, and fetch posts with total count from the backend to emit posts with post count.
Finishing touches clean up post service logic, remove unnecessary subscriptions, re-fetch posts after delete, and implement pagination using a post data object with posts and post count.
Implement authentication to restrict post actions, letting readers view posts while only creators can create, edit, or delete, and add sign-up and login forms.
Handle user input using Angular's template-driven form by creating a login form with email and password fields, validators, and local references, then submit and log form values on login.
Learn to add a sign up screen by duplicating the login components in Angular, connect routes and header links, and prepare backend authentication and saving new users with Mongos.
Learn to create a user model and signup login routes in a node.js backend, using express, mongoose schemas, and the mongoose-unique-validator plugin to ensure unique emails.
Learn how the backend returns a token after successful authentication, send it to the frontend via a login service, store it, and use it for protected routes.
Transmit the expires in duration in seconds from the backend, parse it on login, and set a setTimeout timer to auto-logout when the token expires.
Decode the user id from the token in the check auth middleware, attach it to the request as user data, and store it as the post creator in mongoose schema.
implement robust error handling in an angular mean app by displaying helpful error messages for invalid email or password combinations and unauthorized actions, keeping the app stable and user-friendly.
Show error messages using an Angular Material dialog and a global error interceptor that catches HTTP errors with RxJS catchError and HttpErrorResponse; register the interceptor in app.module.
learn how to implement custom server error messages in a mean stack app, including signup, authentication, post creation, and fetching errors, plus front-end error handling and status codes.
Learn how to create modern, scalable and high-speed web applications with Angular + Node.js + Express + MongoDB.
Angular 1 and NodeJS, together with ExpressJS (a NodeJS Framework) and MongoDB formed the very popular MEAN stack. Now is the time to dive into MEAN 2.0 and replace Angular 1 with Angular 2+.
Benefit from the many improvements and advantages Angular offers you: Speed, ease of development, highly reactive, awesome support for asynchronous operations, great scalability and more!
And combine these advantages with the power of a NodeJS + Express + MongoDB backend!
Learn or refresh the Angular Basics!
This course is no Angular course, but it includes detailed explanations of the core concepts used as well as about Angular in general. However, keep in mind that, as this course is no Angular course, having additional resources like my "Angular - The Complete Guide" course is recommended.
I'm Maximilian Schwarzmüller, an experienced web developer as well as author of many 5-star rated Udemy courses and host of the "Academind" coding channel on YouTube. I will take you on a hands-on journey to get you to build your own Angular + NodeJS Applications in no time!
This course follows a hands-on approach, which means that the whole course is structured around one big application and the different concepts will be explained detailedly as they are introduced in this application.
Specifically, you will learn how to:
Set up a NodeJS + Express + MongoDB + Angular Application with the help of the Angular CLI
Use NodeJS and Express efficiently
Build reusable Components in Angular and create a reactive User Experience with the Tools provided by Angular
Connect your NodeJS (or any other language!) backend with your Angular App through Angular’s HttpClient service
Provide appropriate endpoints on your Backend, for your Frontend to consume
Add advanced features like file upload and pagination
Make your Application more secure by implementing Users, Authentication as well as Authorization
Handle Errors gracefully
And much more!
This hands-on concept allows you to not get stuck in the theory, but instantly see real implementation examples!
Hear what students of other courses as well as viewers of my YouTube channel have to say
Max has gone through great lengths to create great content and this course has been great. His teaching style covers everything from basic to advanced topics, and his explanations have been thorough on each topic
Max demonstrates very good knowledge of the subject matter and great enthusiasm in delivering the lectures.
Max does a wonderful job making the core concepts of Angular approachable and accessible.
Don’t stop at the basics!
Do you know those courses which show you a "Hello World“ example and then call it an end? That won’t happen to you in this course. While beginning with a very basic app and basic features, you will quickly be able to incorporate many different Routes, Observables, Events, Authentication and Authorization, Error Handling and much more into your applications.
The best thing is: You’ll learn all that by putting it into practice immediately! No wall of powerpoint slides, no unrealistic mini-examples – this is the real deal!
Who should take this course?
Basic NodeJS/Express and Angular Experience is strongly recommended
You should be familiar with HTML, CSS and JavaScript basics, too
MongoDB (+ Mongoose) knowledge is a plus as MongoDB will be used in this course but won’t be subject of in-depth explanations
NO expert or advanced knowledge on any of these topics is required or assumed
By the end of this course, you will be able to create your own, awesome NodeJS + Angular applications!
Please note that this course was recorded with an older version of Angular & Angular Material. The code shown in the videos might not always work with the latest versions of these packages. The general concepts & solution steps still apply, of course.