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

Docs Feature Request: Serving from /dist #4290

Closed
johnpapa opened this issue Jan 30, 2017 · 3 comments
Closed

Docs Feature Request: Serving from /dist #4290

johnpapa opened this issue Jan 30, 2017 · 3 comments

Comments

@johnpapa
Copy link
Contributor

Quick Ask

Please add something in the CLI docs that explains how to run the app from the /dist folder. Something that explains how to install lite-server and run it on that folder as a validation or gut-check.

Why? This will help skeptical folks (like me) validate that the /dist files will indeed run properly. The existing ng serve commands run in memory.

Details

from my chat with @filipesilva ...

When I hear build i think that we are going to process the files and prepare them to be served. But not actually serve them. And I think there is a very clear distinction between a dev and prod build. and each of those could be either on disk or in memory. I’m not suggesting these flags, but I am using them to further explain ...

#these dont exist .... just for clarification on how i was thinking ...
build —dev —in-mem
build —dev —disk
build —prod —in-mem
build —prod —disk

then when i serve, it gets interesting …. some tools consider serve as just serving. some consider it as building and serving. For us we have … ng serve which builds a dev build in memory and serves it. then we have ng serve —prod which builds a prod build in memory and serves it. Always in mem.

If we wanted, we could have ...

#these dont exist .... just for clarification on how i was thinking ...
ng serve —dev -in-mem
ng serve —dev -disk
ng serve —prod -in-mem
ng serve —prod -disk

again, im not suggesting all 8 of these. just thinking out loud

The way it actually works , we only have these …

ng build 

#prod build copied to /dist folder
ng build —prod

#dev build in memory and served
ng serve 

#prod build in memory and served
ng serve —prod 

I think those are fine … but I do see myself wanting to try a serve off disk … but we have no way of doing that with CLI. And I think it is perfectly fine to not include this in the CLI ... as long as we explain in the docs how people can run it on their own with something like http-server or lite-server.

cc // @Brocco @wardbell

@johnpapa
Copy link
Contributor Author

I propose we also add to the docs that when you run ng serve that this is entirely in memory, and not files in dist are affected

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jan 30, 2017
`ng serve` will serve the app from memory, but it's easy to think that it just serves what's in `dist/`.

This way, `dist/` is deleted on `ng serve` and users will not have a `dist/` dir where they might think the files are being served from.

Partially address angular#4290
hansl pushed a commit that referenced this issue Jan 31, 2017
`ng serve` will serve the app from memory, but it's easy to think that it just serves what's in `dist/`.

This way, `dist/` is deleted on `ng serve` and users will not have a `dist/` dir where they might think the files are being served from.

Partially address #4290
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
`ng serve` will serve the app from memory, but it's easy to think that it just serves what's in `dist/`.

This way, `dist/` is deleted on `ng serve` and users will not have a `dist/` dir where they might think the files are being served from.

Partially address angular#4290
Brocco added a commit to Brocco/angular-cli that referenced this issue Mar 8, 2017
Brocco added a commit to Brocco/angular-cli that referenced this issue Mar 8, 2017
asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this issue Apr 12, 2017
@jaesung2061
Copy link

Or notify the user at the terminal when they run the command?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants