返回 slidev
remote-access.md
根目录 / docs / features / remote-access.md
1 ---
2 relates:
3 - guide/ui
4 - CLI: builtin/cli
5 - Cloudflare Quick Tunnels: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/
6 tags: [remote, tool]
7 description: |
8 Access your presentation remotely with Slidev's remote access feature.
9 ---
10
11 # Remote Access
12
13 You can run your presentation with remote access by using the `--remote` flag:
14
15 ::: code-group
16
17 ```bash [pnpm]
18 pnpm dev --remote
19 # i.e. slidev --remote
20 ```
21
22 ```bash [npm]
23 npm run dev -- --remote
24 # i.e. slidev --remote
25 ```
26
27 ```bash [yarn]
28 yarn dev --remote
29 # i.e. slidev --remote
30 ```
31
32 ```bash [bun]
33 bun dev --remote
34 # i.e. slidev --remote
35 ```
36
37 ```bash [deno]
38 deno run dev --remote
39 # i.e. slidev --remote
40 ```
41
42 :::
43
44 ## Password Protection
45
46 If you want to share your slides but don't want other people to access the presenter mode, you can pass a password to the option, i.e. `--remote=your_password`. Then the password is required when accessing the presenter mode.
47
48 ## Remote Tunnel
49
50 You can open a [Cloudflare Quick Tunnels](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/) to expose your local server to the internet. This way, you can share your slides with others without setting up a server.
51
52 ::: code-group
53
54 ```bash [pnpm]
55 pnpm dev --remote --tunnel
56 # i.e. slidev --remote --tunnel
57 ```
58
59 ```bash [npm]
60 npm run dev -- --remote --tunnel
61 # i.e. slidev --remote --tunnel
62 ```
63
64 ```bash [yarn]
65 yarn dev --remote --tunnel
66 # i.e. slidev --remote --tunnel
67 ```
68
69 ```bash [bun]
70 bun dev --remote --tunnel
71 # i.e. slidev --remote --tunnel
72 ```
73
74 ```bash [deno]
75 deno run dev --remote --tunnel
76 # i.e. slidev --remote --tunnel
77 ```
78
79 :::
80
80 lines MARKDOWN