Mastering Express Web Application Development
4.1 (12 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
133 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Mastering Express Web Application Development to your Wishlist.

Add to Wishlist

Mastering Express Web Application Development

A fully featured hands-on guide to advanced Express JS usage that covers useful libraries,testing,real-time apps & deplo
4.1 (12 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
133 students enrolled
Last updated 7/2015
Current price: $10 Original price: $95 Discount: 89% off
1 day left at this price!
30-Day Money-Back Guarantee
  • 3 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?
What Will I Learn?
Customise Express by changing how it is configured, the templating engine used, and integrating additional open source tools
Solve complicated problems like handling various websocket standards by using prebuilt tools and libraries to focus on implementing business requirements
Use SocketIO to store user information in a database to build up a collection of users
Create real-time applications that will impress users and help distribute information even faster
Learn how to secure your application with the help of SSL, one of the best security systems and the technology behind HTTPS.
Deploy your application in a reliable and scalable way using Nginx and proxy_pass
Increase application visibility with event logs
Run your application in various environments, by changing nothing but the configuration
View Curriculum
  • A hands-on step-by-step video tutorial, where you'll learn the whys and hows involved in various aspects of building an application with Express.

Express is a fantastic JavaScript framework, but most people only scratch the surface. With just a few changes, Express can adapt to your work strategy, rather than things being the other way around. Express is perfect for developing APIs with performance in mind, and as it's a thin layer on top of standard web technologies it allows you to add any additional technology you want!

Mastering Express Web Application Development will introduce the tools and libraries you need to take your Express development career to the next level. By learning how to use tools to make your life easier, you can do more in less time.

To start, we'll create a new Express application, learn how to configure it and increase application visibility by using logs. We will explore Express itself, along with various libraries that will help improve your development experience. We'll be building on the previous section's work each time. As we move on we'll take a look at technologies such as SSL and Nginx, and work through deploying your application to production in a secure and scalable way. Furthermore, we will study various existing Express projects that are open source, and a review of how they are structured to help you to organize your own applications in a systematic way.

By the end of the course, you will be an expert in using a wide range of new tools and libraries which will help you deliver the best value to your customers.

About the Author

Michael Heap is a polyglot developer who spends most of his time working with high volume real-time systems. He's an established conference speaker, and is passionate about sharing what he's learned during his career so far.

He holds a first class computing degree from Leeds Metropolitan University, and has been programming for just over 10 years. On a daily basis you'll find him writing NodeJS, PHP or Go (with a little Python/Scala thrown in to keep it interesting).

Who is the target audience?
  • If you are comfortable installing Express and building simple applications and think it’s time to take it to the next level, this course is for you. This course will help solve all the complex conundrums in building eye-catching, dynamic, real-time web applications in ExpressJS.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 27 Lectures Collapse All 27 Lectures 02:51:02
Getting Started
4 Lectures 29:11
This video will offer the overview of the course.
Preview 02:18

When we want to change some options in our application, we need to redeploy it for any small change. If we make things configuration-driven, we can change things simply by restarting the application.

Configuration with nconf

By default, we have no idea how our application is working. Adding Winston logs throughout our application means that we can see what happens and when.

Getting to Know Winston

Express comes with a lot of defaults that people don't know they can change. Using Nunjucks shows that there are options out there that people can use.

Installing and Using Nunjucks
Consuming Services
3 Lectures 17:12

We need dynamic content for our app. We'll show popular images from Instagram.

Preview 04:49

We have the Instagram data, but no way of showing it. We'll render the images using Nunjucks so that we can see them.

Showing the Results on a Page

Our app is now slow, as we have to make a request to Instagram every time. We'll cache the results from Instagram so that the response is quicker.

Caching Requests in Memory
Proving That Our Application Works
4 Lectures 23:22

So far, we have no guarantees that our application is working as expected. Installing Mocha is the first step toward solving this problem.

Preview 05:00

Our API calls are very tightly coupled to our application, which means that we can't test them. To make the code easier to test, we need to refactor the code into an externam module.

Refactoring to Make Things Testable

When writing tests for code that hits an external service, you can never guarantee what it will send back. Mocking this method gives you a known set of return data that you can use in your tests.

Mocking to Remove Dependencies

When implementing things such as caches, there's no way to prove that we actually try and fetch the data from the cache before hitting an external service. Using Sinon, we can spy on methods to make sure that they're actually called.

Spying with SinonJS
Let's Get Real-time
4 Lectures 22:03
Our application is currently static. It loads data once and then it doesn't change. By installing, we can provide real-time functionalities.
Preview 03:53

We've installed, but it doesn't do anything yet. Let's add a real-time commenting system to our app.

Sending and Receiving Data in Real-time

We can send data to everyone, but what if we want to send data to a specific user? Let's add a chatroom to our application.
Scoping Data to Individual Users

We can send messages to specific people, but how do we send messages to everyone? Let's create a public room for people to chat in.
Adding a Chat Room
Advanced Express
4 Lectures 24:55

Sometimes, we want to perform an action on every request, for example, authentication. Middleware allows us to run functions on every request.

Preview 06:11

Each section of an application can be considered separate—user management is different from a checkout and payment process. Subapplications allow you to write multiple distinct modules and glue them all together in one application.
Mounting Sub-applications

For AJAX requests, we usually don't want to send back HTML. Express makes it really easy to send back JSON for AJAX requests.
Serving Content Conditionally for AJAX

Until now, each time we refresh, our data disappeared. Using MySQL, we can save our data so that it's still there when we come back later.

Persistence with Sequelize and MySQL
3 Lectures 21:07
Unless your application is running over HTTPS, communication between your app and the user isn't encrypted. To encrypt the data, we need an SSL certificate to run over HTTPS.
Preview 09:34

CSRF is when people can trigger actions on your site with carefully crafted links/forms on their site. To prevent this, we use node-csurf, which generates a token on every request that we check.
Preventing CSRF

There are a lot of lesser known but still important application vulnerabilities out there. Helmet provides an easy way to mitigate several of them, wrapped up in one useful library.
Using Helmet to Make Your App More Secure
Shipping to Production
3 Lectures 16:22

By default, NodeJS has a single event loop. If it gets blocked, no more requests can be handled. NodeJS cluster allows us to run multiple instances of our application, which means we have multiple event loops.

Preview 05:02

As NodeJS cluster is still experimental, we need a more reliable way to run multiple instances of our application. Thankfully, Nginx supports receiving requests and forwarding them on to another process, in this case, our application.

Nginx and NodeJS

When our application crashes, it will stay dead until we restart it. This means that no requests will be accepted from users. Supervisord will watch our application and automatically restart it when needed.
Using Supervisord to Keep Things Running
Using Larger Express Applications
2 Lectures 16:50

We've built a small application, but how does it measure up against other Express projects? Let's take a look at Ghost and see how they've structured things.

Preview 08:53

We've built a small application, but how does it measure up against other Express projects? Let's take a look at Balloons and see how they've structured things.
About the Instructor
Packt Publishing
3.9 Average rating
4,005 Reviews
32,314 Students
318 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.