Express.js Code Reading

Tuesday, October 24, 2023 | Permalink

Following are the list of the points that I find interesting while reading Express code (I'm still reading the source code).

  • Express 4.x support Node v0.10. Due to this, code is not written in ES6.
  • 'use strict' increase the performance.
  • When you write app.set('view engine', 'something'), Express will check something module in node_modules and load it. EJS use this trick and due to this, you just have write this line only. Even you don't have to import ejs (or something in example).
  • All the repos under Express org on GitHub has either index.js if the package is consist of only one file or the package code is within lib folder.

In progress. I'll add more points as I learn more.

Labels: