Skip to content

Support running pub serve on directories other than "web/" #805

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

Closed
DartBot opened this issue Jun 5, 2015 · 8 comments
Closed

Support running pub serve on directories other than "web/" #805

DartBot opened this issue Jun 5, 2015 · 8 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="96" height="96"hspace="10"> Issue by munificent
Originally opened as dart-lang/sdk#15924


This is the pub serve dual of #­14673.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


It's possible this should work somewhat differently for "pub serve" than for "pub build". For building the primary use-case for building a specific directory is to take the output -- for example, an example app -- and put it on a server somewhere. This means that saying e.g. "pub build example/foo" makes a lot of sense. For "pub serve", though, it may be more useful to just have the server always make the examples and tests accessible. You'd still run "pub serve" without any arguments, but then you could go to "http://localhost/_pkg/example/foo" (or something, "_pkg" is just a strawman).

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Marked this as blocking dart-lang/sdk#15859.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Unmarked this as blocking dart-lang/sdk#15859.

@DartBot DartBot added type-enhancement A request for a change that isn't a bug Fixed labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Marked this as blocking dart-lang/sdk#15830.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added DevStory label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Set owner to @nex3.
Added Started label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2192312?v=3" align="left" width="48" height="48"hspace="10"> Comment by keertip


Marked this as blocking dart-lang/sdk#16889.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Support for this has been added in dart-lang/sdk@2d1a8c7. "pub serve" can now serve files from multiple directories, each on a different port. By default it serves "web" on port 8080 and "test" on port 8081; additional command-line arguments can be passed to cause it to serve other directories. For example, "pub serve example/foo" will serve example/foo on port 8082 (8080 and 8081 are always reserved for "web" and "test").


Added Fixed label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants