Skip to content

Commit ba6b8da

Browse files
docs: add proxying to angular app (#5457)
* docs(guide): add proxying to Angular app * fixup: formatting * fixup: formatting Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
1 parent 43b87ed commit ba6b8da

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/guide.md

+10
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [Stripping `/proxy/<port>` from the request path](#stripping-proxyport-from-the-request-path)
1717
- [Proxying to create a React app](#proxying-to-create-a-react-app)
1818
- [Proxying to a Vue app](#proxying-to-a-vue-app)
19+
- [Proxying to an Angular app](#proxying-to-an-angular-app)
1920
- [SSH into code-server on VS Code](#ssh-into-code-server-on-vs-code)
2021
- [Option 1: cloudflared tunnel](#option-1-cloudflared-tunnel)
2122
- [Option 2: ngrok tunnel](#option-2-ngrok-tunnel)
@@ -382,6 +383,15 @@ module.exports = {
382383

383384
Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/#publicpath)
384385

386+
### Proxying to an Angular app
387+
388+
In order to use code-server's built-in proxy with Angular, you need to make the following changes in your app:
389+
390+
1. use `<base href="./.">` in `src/index.html`
391+
2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json`
392+
393+
For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983).
394+
385395
## SSH into code-server on VS Code
386396

387397
[![SSH](https://img.shields.io/badge/SSH-363636?style=for-the-badge&logo=GNU+Bash&logoColor=ffffff)](https://ohmyz.sh/) [![Terminal](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff)](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff) [![Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-007ACC?style=for-the-badge&logo=Visual+Studio+Code&logoColor=ffffff)](vscode:extension/ms-vscode-remote.remote-ssh)

test/e2e/extensions.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as path from "path"
21
import { test as base } from "@playwright/test"
3-
import { describe, test, expect } from "./baseFixture"
2+
import * as path from "path"
43
import { getMaybeProxiedCodeServer } from "../utils/helpers"
4+
import { describe, test, expect } from "./baseFixture"
55

66
function runTestExtensionTests() {
77
// This will only work if the test extension is loaded into code-server.

0 commit comments

Comments
 (0)