
Explore how the browser and server exchange requests and responses, and learn how Node.js runs JavaScript on the server, including installing Node.js and checking node -v and npm -v.
Create a Node.js server using the http module, require it, log the request URL, respond with hello NodeJS, and listen on port 3000.
Understand the request and response objects in a NodeJS server via a callback. Route /, /about, /contact and use 200 and 404 status codes with write head and end.
Serve html pages from a node server using the file system module to read index.html, about.html, and contact.html with readFileSync, and respond to browser requests based on the url.
Compare asynchronous versus synchronous task execution in Node.js, contrasts with PHP's blocking approach; see how readFileSync blocks, while readFile with a callback enables non-blocking server operations.
Explore npm and package management in Node.js to install Express, manage dependencies with package.json, and understand node_modules.
Install, require, and initialize Express to create a simple Node.js server; define get routes and respond with json or text to build a basic API.
Learn to serve HTML files with Express using the sendFile function. Resolve absolute paths with path.resolve and __dirname to map home, about, and contact pages via app.get routes.
Learn how to serve static assets with express by configuring a public directory and using express.static, enabling the browser to retrieve CSS, JavaScript, and image files alongside HTML.
Download and extract a clean blog template and scaffold an express project. Start the app with npm start to run on port 4000, using nodemon for automatic restarts during development.
Set up the home page in a Node.js express app by configuring a public directory and a root route to serve index.html, including css, js, and image assets.
Create the about page by wiring an Express route and serving about.html with path.resolve, then register routes for post and contact pages to complete the template.
Explains templating engines and how the Edge templating engine with Express solves the maintenance challenge of updating navigation across many pages by rendering templates from a views directory.
Use layouts in templating engines to extract common elements such as the nav bar and footer, then inherit the layout and inject page content to render unique pages.
Refactor post and contact pages to use the edge templating engine by extending the layout, defining content and scripts sections, and injecting page-specific HTML and JavaScript via the views directory.
Explore MongoDB's NoSQL architecture, including databases, collections, and documents, and learn to install MongoDB locally and use Robo Tweetie to view data.
Install and integrate mongoose to connect Node.js with MongoDB and set up a post collection. Define a post schema with title, description, and contents, then create and export post model.
Explore create, read, update, and delete operations with mongoose models by connecting to a MongoDB database, creating a post document, and reviewing it in robomongo.
Learn how to read data from a Mongoose database with the model's find function, filter by title or fetch all records, and handle callbacks.
Learn to fetch a single MongoDB document by its unique object ID using Mongoose find by ID, and handle errors when IDs are invalid or do not exist.
Update database documents in MongoDB by using mongoose.findByIdAndUpdate with the record's id and a fields object (for example, updating the title), then verify the changes reflect in the database.
Create a new post form view, register the /post/new route, and implement a Bootstrap-based form with title, description, and content fields, including placeholders and a create post button.
Explore handling post requests in Express by creating a post route, configuring the form, and parsing request bodies with body-parser to save data to the database.
Save browser-submitted posts to the database via the Post model's create method with request.body, then redirect to the home page.
Learn to display posts from a mongodb database by converting callbacks to async/await, querying all posts with post.find({}), and passing them to the view for rendering.
Render dynamic post data from a database by looping through the posts array using a templating engine and Mustache syntax to display each post's title and id.
Render a dynamic single post page by using a route like /post/:id, fetch the post by id from the database, and render its data in the view with dynamic links.
Add a username and createdAt fields to the post schema in a Node.js MongoDB app, set a default date, and render post.username and post.createdAt in the user interface with formatting.
Rename the description field to subtitle across the post model, forms, and templates; update index and post views to display post.subtitle, then reset the database to verify new posts render.
learn how to upload images with express by installing express-fileupload, adding a file input named image to the form, configuring multipart form data, and moving the file to public/post.
Add an image field to store the uploaded file path for each post, update the save logic, and render dynamic post backgrounds using the stored image path.
Explore express middleware, how app.use registers functions that run before handling requests, and why calling next lets the request, with added file property by upload middleware, proceed.
Register a validation middleware with Express to guard post creation against missing images and required fields. Redirect invalid submissions back to the creation page and call next on success.
Refactor a Node.js application from a monolithic index.js to an MVC architecture, introducing models, views, and controllers for creating, storing, and retrieving posts on three routes.
Refactor your NodeJS middleware by creating a dedicated middleware directory, naming files to match controllers, and wiring modules with require and module.exports to prevent errors in the controller.
Learn to implement user registration by creating a user model, a register view, and a create user controller, wiring the /auth/register route and a page with username, email, and password.
Create a mongoose user model with username, email, and password, and export it as the user model. Set up a /users/register route and a store user controller to handle registrations.
Handle user registration by creating a new user from the request body and redirecting to the homepage on success; passwords are stored in plain text and will be hashed next.
Encrypt user passwords before saving using a mongoose pre save hook with bcrypt. Hash the password with ten rounds, replace the plain password with the hash, and proceed with saving.
Learn to implement Mongoose model validation for user data, enforcing required email, username, and password fields, and preventing duplicate emails with proper error handling and redirects.
Implement login flow by rendering a login view, wiring routes for /auth/login and users/login, and handling form submission with a login user controller that redirects back to the home page.
Explain login process: fetch email and password, find the user by email, compare passwords with bcrypt, and redirect to the home page on success or back to login on failure.
Implement express sessions for user authentication with cookies, a secret, and storing user IDs; register the middleware to guard routes, and note that sessions reset on server restart.
Learn to persist express sessions by storing them in MongoDB with connect-mongo, wiring a mongo store to express-session and using mongoose connection to keep users logged in after restarts.
Implement a custom authentication middleware in a Node.js app to verify user sessions and protect the post new and post store routes.
Display and format Mongoose validation errors on registration by mapping error messages, storing them in the session, and using connect-flash to flush after the request.
Display validation messages in the edge template by passing request.session.registration.errors, render a red error list, and note that errors persist until flashed in the next lesson.
Learn to implement flash messaging with connect-flash in an express app, storing validation errors in the session and displaying them for the next request only, with custom mongoose error messages.
Persist form input across redirects by flushing request body to flash data, then repopulate the form with data.username and data.email to improve user experience during validation.
Implement a redirect-if-auth middleware for a Node.js app with MongoDB to prevent authenticated users from accessing login and register pages by checking session userId and redirecting to the home page.
Share auth state across pages with a global middleware exposed to views via the templating engine. Hide login and register links in the nav when the user is logged in.
Learn to implement user logout in a Node.js app by creating a get /auth/logout route, destroying the session, and redirecting to the home page, with authentication checks.
Relate the post collection to the user collection by storing the authenticated user ID as an objectId and referencing it in the post schema, enabling population of the creator data.
Use Mongoose populate to replace the user id with the author object. Display author.username on the home list and single post pages by populating author data in the controllers.
Create a 404 not found page in an Express app with a catch-all route rendering the not-found view, and adjust the logout middleware to require authentication.
Integrate a wysiwyg editor (summernote) into the app with bootstrap four configuration, loading the required css and js CDNs, and render the HTML with triple braces.
Upload files to Cloudinary from a Node.js with Express app, configure with API key, secret, and cloud name, upload to server then to Cloudinary, and store secure_url in the post.
Learn how to secure credentials and configure Node.js apps for different environments using environment variables, dot env, and process.env, covering db uri, cloudinary keys, and session keys.
What is this course about?
Nodejs, the most popular server side framework (runtime)
Why should I join this course?
The largest companies in the world like PayPal, Uber, etc are switching to the technologies taught in this course. Join this course to upgrade your knowledge and be prepared for the future.
What's the teaching methodology?
This course follows a project driven approach , and at the end of the course, you must have built a complete web application from scratch.
What topics are covered in the course?
Nodejs
Express framework
Mongodb
Mongoose ODM
Express sessions
Mongoose data validation
Express Middleware & Request interception
User authentication and authorization
Dynamic views with templating engines
Model View Controller design pattern
Password security and hashing
Mongoose model hooks
And so so much more !!!