Skip to content

Commit 903259d

Browse files
authored
docs: show proxy.conf.json in the client-only setup steps (#454)
The "Add the proxy config" step said "Save the proxy.conf.json above", but the file was only in the last tab of the server-part code group, behind the Express tab and in another section. The steps now point to a copy of it right below them, next to the angular.json excerpt. Fixes #446
1 parent 678b965 commit 903259d

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎apps/docs/src/content/getting-started/installation.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ An app created with `ng new --ssr=false` only runs `ng serve`. Run the standalon
240240
Run <code>npx pangular dev --port 9999 --proxy-origin http://localhost:4200</code> from the root of your workspace. It serves the panel, the connection and the WebSocket at the root of port 9999. <code>--proxy-origin</code> names the origin of <code>ng serve</code>, so the CLI prints its links for <code>http://localhost:4200/__pangular/</code>.
241241
</ngmd-step>
242242
<ngmd-step title="Add the proxy config">
243-
Save the <code>proxy.conf.json</code> above next to <code>angular.json</code>. It strips the <code>/__pangular</code> prefix, and <code>"ws": true</code> forwards the WebSocket the overlay and the panel connect over.
243+
Save the <code>proxy.conf.json</code> below next to <code>angular.json</code>. It strips the <code>/__pangular</code> prefix, and <code>"ws": true</code> forwards the WebSocket the overlay and the panel connect over.
244244
</ngmd-step>
245245
<ngmd-step title="Point ng serve at it">
246246
Set <code>proxyConfig</code> in the <code>serve</code> options of <code>angular.json</code>, or run <code>ng serve --proxy-config proxy.conf.json</code>.
@@ -253,6 +253,18 @@ An app created with `ng new --ssr=false` only runs `ng serve`. Run the standalon
253253
</ngmd-step>
254254
</ngmd-workflow>
255255

256+
Save this as `proxy.conf.json` next to `angular.json`:
257+
258+
```json
259+
{
260+
"/__pangular": {
261+
"target": "http://localhost:9999",
262+
"pathRewrite": {"^/__pangular": ""},
263+
"ws": true
264+
}
265+
}
266+
```
267+
256268
Point the dev server at the proxy file in `angular.json` (excerpt):
257269

258270
```json

0 commit comments

Comments
 (0)