From the course: Advanced Express
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Tuning Express performance: NODE_ENV and compression
From the course: Advanced Express
Tuning Express performance: NODE_ENV and compression
- [Narrator] As soon as your application is deployed to server and available to for real users performance becomes key, and this not only about the user experience of individual users, but also cost effective, because inefficient code needs more resources to run, which forces you to scale up or out. The suggestions in this video are loosely based on the performance based practices from the Express website. We will implement some of them in this chapter, or I will at least explain them. The environment varietal NODE_ENV, is not just a convention to use to distinguish between different configurations in your code. It is also used by Express to make assumptions when it comes to caching and login. For instance when running in development, templates are not cached, but compiled for each execution, which makes sense, because this lets you work on a template, and seeing the changes without restarting the app every time. Of course this comes with a performance penalty and my test indicate…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Tuning Express performance: NODE_ENV and compression4m 6s
-
(Locked)
Tuning Express performance: Further measures2m 2s
-
(Locked)
Add logging5m 3s
-
(Locked)
Using the Node.js cluster module5m 12s
-
(Locked)
Securing an Express application2m 44s
-
(Locked)
Deployment and operation with PM24m 37s
-
(Locked)
Running behind a web server5m 8s
-
(Locked)
-