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

feat: allow easier deployment with default app schematics #672

Closed
wants to merge 3 commits into from

Conversation

sinedied
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Currently, the generated starter app has 2 issues:

  • It use a hardcoded port (3000) instead of using process.env.PORT with a fallback
  • It does not allow to package the app properly using npm pack

Both these issues cause the default generated app to be undeployable on most cloud providers.

Issue Number: N/A

What is the new behavior?

This PR fixes the 2 issues above, so the default generated app can be deployed easily on most cloud providers.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@sinedied sinedied changed the title Improve app feat: allow easier deployment with default app schematics Apr 27, 2021
@sinedied
Copy link
Author

Just saw that a similar PR was sent (currently in conflict), without the packaging part: #288

@jdubois
Copy link

jdubois commented Apr 27, 2021

This would definitely improve deployment on Azure 🎉

@kamilmysliwiec
Copy link
Member

We're tracking this here #288

@sinedied
Copy link
Author

@kamilmysliwiec as #288 seems stalled, and this one also adds proper packaging would it be ok if I add @BrunnerLivio as co-author on this PR to give him credits and re-open this one?

@BrunnerLivio
Copy link
Member

BrunnerLivio commented Jun 11, 2021

@sinedied I think it makes sense to go with your PR instead! No worries about credits :)

If that is ok, re-open this one and I’ll close #288

Copy link
Member

@micalevisk micalevisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this LGTM! @sinedied please update the docs as well https://docs.nestjs.com/first-steps#setup

@kamilmysliwiec can you please close #288 and review this one instead?

@kamilmysliwiec
Copy link
Member

This has been discussed in the past and currently, we don't plan on making PORT the default. I left 1 PR open just in case we change our mind in the future.

@sinedied
Copy link
Author

Hi @kamilmysliwiec, would it be possible to share a link to the discussion about not using process.env.PORT? I don't recall having seen one on this repo, and I would like to understand why you don't want this as a default.
The only reference I found is the issue about it on this repo, but you stated there that it should be made the default so I'm a bit confused: #125 (comment)
Thanks

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

Successfully merging this pull request may close these issues.

None yet

5 participants