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

Remove app.set('port', port); in express generator 4 #81

Closed
superclarkk opened this issue May 22, 2015 · 4 comments
Closed

Remove app.set('port', port); in express generator 4 #81

superclarkk opened this issue May 22, 2015 · 4 comments
Assignees

Comments

@superclarkk
Copy link

Setting the port, like, `app.set('port', port), is not supported in express 4, so should be removed.

@dougwilson
Copy link
Contributor

Can you explain how is it not supported in Express 4? Settings are just a bag of whatever you want.

@dougwilson dougwilson self-assigned this May 22, 2015
@superclarkk
Copy link
Author

How is it utilised in the generated app? At the very least, it's superfluous.

@dougwilson
Copy link
Contributor

It's just a very common convention to know what port your app is on to provide links in your layouts. Adding that makes {{port}} available in your layouts automatically, so you can do <a href="http://localhost:{{port}}/blah"> and it'll work for your development.

@dougwilson
Copy link
Contributor

It was only added after tons and tons of requests for it; I'm not going to remove it and go through that again. If there is a PR you want to make to add more information to this line, or use it somewhere in the app, that would be accepted :)

cwonrails pushed a commit to cwonrails/generator that referenced this issue Apr 29, 2018
Add missing classes with transparent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants