mern-starter icon indicating copy to clipboard operation
mern-starter copied to clipboard

Using Express as a factory method

Open lostintangent opened this issue 8 years ago • 1 comments

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.

lostintangent avatar Mar 28 '17 22:03 lostintangent

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

lostintangent avatar Mar 28 '17 22:03 lostintangent