From e5337e24ea0bd9d8bd73e43e948af93985ec3380 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 15 Aug 2022 11:17:20 -0700 Subject: [PATCH 1/3] docs(guide): add proxying to Angular app --- docs/guide.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/guide.md b/docs/guide.md index fb32093f0b14..f34c2b8b8de5 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -16,6 +16,7 @@ - [Stripping `/proxy/` from the request path](#stripping-proxyport-from-the-request-path) - [Proxying to create a React app](#proxying-to-create-a-react-app) - [Proxying to a Vue app](#proxying-to-a-vue-app) + - [Proxying to an Angular app](#proxying-to-an-angular-app) - [SSH into code-server on VS Code](#ssh-into-code-server-on-vs-code) - [Option 1: cloudflared tunnel](#option-1-cloudflared-tunnel) - [Option 2: ngrok tunnel](#option-2-ngrok-tunnel) @@ -382,6 +383,14 @@ module.exports = { Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/#publicpath) +### Proxying to an Angular app + +In order to use code-server's built-in proxy with Angular, you need to make the following changes in your app: +1. use `` in `src/index.html` +2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json` + +For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983). + ## SSH into code-server on VS Code [![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) From b671f72b04701fe233007243fc98fdec5b622a18 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 15 Aug 2022 11:17:51 -0700 Subject: [PATCH 2/3] fixup: formatting --- test/e2e/extensions.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/extensions.test.ts b/test/e2e/extensions.test.ts index 70785bca6a15..5f42cbb5c9aa 100644 --- a/test/e2e/extensions.test.ts +++ b/test/e2e/extensions.test.ts @@ -1,7 +1,7 @@ -import * as path from "path" import { test as base } from "@playwright/test" -import { describe, test, expect } from "./baseFixture" +import * as path from "path" import { getMaybeProxiedCodeServer } from "../utils/helpers" +import { describe, test, expect } from "./baseFixture" function runTestExtensionTests() { // This will only work if the test extension is loaded into code-server. From da52e663071f3e1c554a45ff7f7897b537c9e098 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 15 Aug 2022 11:51:01 -0700 Subject: [PATCH 3/3] fixup: formatting --- docs/guide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/guide.md b/docs/guide.md index f34c2b8b8de5..8bf4e77f40c6 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -386,6 +386,7 @@ Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/# ### Proxying to an Angular app In order to use code-server's built-in proxy with Angular, you need to make the following changes in your app: + 1. use `` in `src/index.html` 2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json`