-
Notifications
You must be signed in to change notification settings - Fork 5.9k
How to expose angular port 4200? #994
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
Comments
For now you'll have to expose the port yourself on the Docker container. Something like Tracking for having a way built into code-server to proxy ports is here: #512 |
I've already did that but the connection is still refused. Even with curl in the container itself it's still refusing the connection. |
Curious. I gave it a shot but `curl localhost:4200` inside the
container worked for me. As for accessing it outside of the
container, keep in mind 127.0.0.1 is only available locally (so
only within the container) which means you'll have to do something
like `ng serve --host 0.0.0.0`.
|
Can we reopen this to investigate it? |
Oh wow, today I just tested it again and now it works but nothing changed. Even the external access on the exposed port 4200 works. |
I'm having the same issue when trying to start
However, unlike earlier comment. I can access angular app from inside Versions info:
UPDATE: UPDATE2: |
Happy to hear you got everything working! Let us know if you have any issues :) |
I have a similar question but not related to exposing. When I run ng serve, it creates a proxy urls domain.com/proxy/4200 while the index loads, the dependant files styles.css, main.js are loading from domain.com and result in a 404. Where am I going wrong? I tried changing baseurl to proxy/4200 and still doesnt work. |
What paths are the 404s trying to request?
If the paths are relative they might be trying to access
domain.com/proxy/styles.css so adding a trailing slash when browsing
will fix it (domain.com/proxy/4200/).
If that doesn't work trying the non-rewriting proxy might work
(domain.com/absproxy/4200/).
|
changing css location and " ng serve --host 0.0.0.0 --disable-host-check" fixed issues for me PS: It did work at first and now its not working idk why it stopped working! |
First of all, thank you for this awesome project!
Now i setup the code-server to extend my dev setup and have the ability to code on my ipad. I managed to get all of it working (event with angular cli). But now I want to open the page. Angular opens a port 4200 with hot reload etc. How can I expose this port to open the page on my localhost (work machine).
I've run the code-server v2 (latest v2) within a docker container.
The text was updated successfully, but these errors were encountered: