Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Express as a factory method #296

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Using Express as a factory method #296

wants to merge 1 commit into from

Conversation

lostintangent
Copy link

@lostintangent lostintangent commented Mar 28, 2017

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
Copy link
Author

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

@mannyhenri mannyhenri self-requested a review June 1, 2018 21:44
@mannyhenri mannyhenri added the V2.9.0 Express & server updates label Jun 1, 2018
@mannyhenri mannyhenri added this to the 2.9.0 milestone Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2.9.0 Express & server updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants