mern-starter
mern-starter copied to clipboard
Using Express as a factory method
This simply changes the usage of express to reflect the typical idiomatic pattern, since the express API is a factory method, not a constructor. It's a trivial nit, but it seems helpful for users to see consistency across various boilerplates/etc. that make use of Express.
CC @somus for consideration.
Note that while it's a lower/secondary priority, this change also makes some editors behave correctly (e.g. VS Code), when providing auto-completion, since they expect express to be used as a factory method, which it is, and therefore, the use of new throws them off.
So all around, this simple change seems like a good idea :)