Skip to content

Commit a458dd3

Browse files
committed
docs: add proxying a vue app
1 parent 1d8806f commit a458dd3

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/guide.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ we recommend using another method, such as [Let's Encrypt](#let-encrypt) instead
8787
# This is the same as the above SSH command, but it runs in the background
8888
# continuously. Be sure to add `mutagen daemon start` to your ~/.bashrc to
8989
# start the mutagen daemon when you open a shell.
90-
90+
9191
mutagen forward create --name=code-server tcp:127.0.0.1:8080 < instance-ip > :tcp:127.0.0.1:8080
9292
```
9393

@@ -348,3 +348,22 @@ You should then be able to visit `https://my-code-server-address.io/absproxy/300
348348
code-server!
349349

350350
> We highly recommend using the subdomain approach instead to avoid this class of issue.
351+
352+
### Proxying to a Vue app
353+
354+
Similar to the situation with React apps, you have to make a few modifications to proxy a Vue app.
355+
356+
1. add `vue.config.js`
357+
2. update the values to match this (you can use any free port):
358+
```js
359+
module.exports = {
360+
devServer: {
361+
port: 3454,
362+
sockPath: 'sockjs-node',
363+
},
364+
publicPath: "/absproxy/3454",
365+
}
366+
```
367+
3. access app at `<code-server-root>/absproxy/3454` e.g. `http://localhost:8080/absproxy/3454`
368+
369+
Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/#publicpath)

0 commit comments

Comments
 (0)