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.4 (9 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.
100 students enrolled
$19
$95
80% off
Take This Course
  • Lectures 27
  • Length 3 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 10/2015 English

Course Description

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).

What are the requirements?

  • 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.

What am I going to get from this course?

  • 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

What 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.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Getting Started
02:18
This video will offer the overview of the course.
10:15

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.

10:22

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.

06:16

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.

Section 2: Consuming Services
04:49

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

06:46

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

05:37

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.

Section 3: Proving That Our Application Works
05:00

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

04:38

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.

07:13

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.

06:31

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.

Section 4: Let's Get Real-time
03:53
Our application is currently static. It loads data once and then it doesn't change. By installing Socket.io, we can provide real-time functionalities.
08:18

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

06:59
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.
02:53
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.
Section 5: Advanced Express
06:11

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

03:35
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.
06:04
For AJAX requests, we usually don't want to send back HTML. Express makes it really easy to send back JSON for AJAX requests.
09:05

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.

Section 6: Security
09:34
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.
08:02
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.
03:31
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.
Section 7: Shipping to Production
05:02

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.

02:50

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.

08:30
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.
Section 8: Using Larger Express Applications
08:53

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.

07:57

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.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Packt Publishing, Tech Knowledge in Motion

Over the past ten years Packt Publishing has developed an extensive catalogue of over 2000 books, e-books and video courses aimed at keeping IT professionals ahead of the technology curve. From new takes on established technologies through to the latest guides on emerging platforms, topics and trends – Packt's focus has always been on giving our customers the working knowledge they need to get the job done. Our Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.

Ready to start learning?
Take This Course