Add Svelte to guide (#6269)
Added a guide on proxying to a Svelte app since there wasn't one already. Used the vue and angular guides as a template and included a link to an issue post on sveltekits website which adds some context.
This commit is contained in:
parent
7fb54073db
commit
7cbb6a8b09
@ -19,6 +19,7 @@
|
|||||||
- [Proxying to create a React app](#proxying-to-create-a-react-app)
|
- [Proxying to create a React app](#proxying-to-create-a-react-app)
|
||||||
- [Proxying to a Vue app](#proxying-to-a-vue-app)
|
- [Proxying to a Vue app](#proxying-to-a-vue-app)
|
||||||
- [Proxying to an Angular app](#proxying-to-an-angular-app)
|
- [Proxying to an Angular app](#proxying-to-an-angular-app)
|
||||||
|
- [Proxying to a Svelte app](#proxying-to-a-svelte-app)
|
||||||
- [SSH into code-server on VS Code](#ssh-into-code-server-on-vs-code)
|
- [SSH into code-server on VS Code](#ssh-into-code-server-on-vs-code)
|
||||||
- [Option 1: cloudflared tunnel](#option-1-cloudflared-tunnel)
|
- [Option 1: cloudflared tunnel](#option-1-cloudflared-tunnel)
|
||||||
- [Option 2: ngrok tunnel](#option-2-ngrok-tunnel)
|
- [Option 2: ngrok tunnel](#option-2-ngrok-tunnel)
|
||||||
@ -414,6 +415,27 @@ In order to use code-server's built-in proxy with Angular, you need to make the
|
|||||||
|
|
||||||
For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983).
|
For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983).
|
||||||
|
|
||||||
|
### Proxying to a Svelte app
|
||||||
|
|
||||||
|
In order to use code-server's built-in proxy with Svelte, you need to make the following changes in your app:
|
||||||
|
|
||||||
|
1. Add `svelte.config.js` if you don't already have one
|
||||||
|
2. Update the values to match this (you can use any free port):
|
||||||
|
|
||||||
|
```js
|
||||||
|
const config = {
|
||||||
|
kit: {
|
||||||
|
paths: {
|
||||||
|
base: "/absproxy/5173",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Access app at `<code-server-root>/absproxy/5173/` e.g. `http://localhost:8080/absproxy/5173/
|
||||||
|
|
||||||
|
For additional context, see [this Github Issue](https://github.com/sveltejs/kit/issues/2958)
|
||||||
|
|
||||||
## SSH into code-server on VS Code
|
## SSH into code-server on VS Code
|
||||||
|
|
||||||
[](https://ohmyz.sh/) [](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff) [](vscode:extension/ms-vscode-remote.remote-ssh)
|
[](https://ohmyz.sh/) [](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff) [](vscode:extension/ms-vscode-remote.remote-ssh)
|
||||||
|
Reference in New Issue
Block a user