You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: messages/multi-framework.dev.md
+48-40Lines changed: 48 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,98 +1,106 @@
1
1
# summary
2
2
3
-
Preview a web app locally without needing to deploy
3
+
Preview a web application locally and in real-time, without deploying it to your org.
4
4
5
5
# description
6
6
7
-
This command starts a local development server so you can preview a web application using the local metadata files in your DX project. Using a local preview helps you quickly develop web applications, because you don't have to continually deploy metadata to your org.
7
+
This command starts a local development (dev) server so you can preview a web application using the local metadata files in your DX project. Using a local preview helps you quickly develop web applications, because you don't have to continually deploy metadata to your org.
8
8
9
9
The command also launches a local proxy server that sits between your web application and Salesforce, automatically injecting authentication headers from Salesforce CLI's stored tokens. The proxy allows your web app to make authenticated API calls to Salesforce without exposing credentials.
10
10
11
+
Even though you're previewing the web application locally and not deploying anything to an org, you're still required to authorize and specify an org to use this command.
12
+
13
+
Salesforce web applications are represented by the WebApplication metadata type.
14
+
11
15
# flags.name.summary
12
16
13
-
Identifies the Web Application (optional)
17
+
Name of the web application to preview.
14
18
15
19
# flags.name.description
16
20
17
-
The unique name of the web application as defined in webapplication.json. If not provided, the command will automatically discover webapplication.json files in the current directory and subdirectories. If only one webapplication.json is found, it will be used automatically. If multiple are found, you will be prompted to select one.
21
+
The unique name of the web application, as defined by the "name" property in the webapplication.json runtime configuration file. The webapplication.json file is located in the "multiframework" metadata directory of your DX project, such as force-app/main/default/multiframework/MyApp/webapplication.json.
22
+
23
+
If you don't specify this flag, the command automatically discovers the webapplication.json files in the current directory and subdirectories. If the command finds only one webapplication.json, it automatically uses it. If it finds multiple files, the command prompts you to select one.
18
24
19
25
# flags.url.summary
20
26
21
-
Dev server origin to forward UI/HMR/staticrequests
27
+
URL where your developer server runs, such as https://localhost:5173. All UI, static, and hot deployment requests are forwarded to this URL.
22
28
23
29
# flags.url.description
24
30
25
-
The URL where your dev server is running (e.g., http://localhost:5173). Required if webapplication.json does not contain a dev.command or dev.url configuration. All non-Salesforce API requests will be forwarded to this URL.
31
+
You must specify this flag if the web application's webapplication.json file doesn't contain a value for either the "dev.command" or "dev.url" configuration properties. All non-Salesforce API requests are forwarded to this URL.
32
+
33
+
If you specify this flag, it overrides the value in the webapplication.json file.
26
34
27
-
Dev server URL precedence: --url flag > manifest dev.url > URL from dev server process (started via manifest dev.command or default npm run dev).
35
+
This is the order of precedence that the dev server uses for the URL: --url flag > manifest dev.url > URL from the dev server process (which was started using either manifest dev.command or default npm run dev).
28
36
29
37
# flags.port.summary
30
38
31
-
Local proxy port
39
+
Local port where the proxy server listens.
32
40
33
41
# flags.port.description
34
42
35
-
The port on which the proxy server will listen. Your browser should connect to this port, not directly to the dev server. The proxy will forward authenticated requests to Salesforce and other requests to your dev server.
43
+
Be sure your browser connects to this port, and not directly to the dev server. The proxy then forwards authenticated requests to Salesforce and other requests to your local dev server.
36
44
37
45
# flags.open.summary
38
46
39
-
Auto-open proxy URL in default browser
47
+
Automatically open the proxy server URL in your default browser when the dev server is ready.
40
48
41
49
# flags.open.description
42
50
43
-
Automatically opens the proxy server URL in your default web browser when the server is ready. This saves you from manually copying and pasting the URL. The browser will open to the proxy URL (not the dev server URL directly), ensuring all requests are properly authenticated.
51
+
This flag saves you from manually copying and pasting the URL. The browser opens to the proxy URL, and not the dev server URL directly, which ensures that all requests are property authenticated.
44
52
45
53
# examples
46
54
47
-
- Start the development server (auto-discovers webapplication.json):
55
+
- Start the local development (dev) server by automatically discovering the web application's webapplication.json file; use the org with alias "myorg":
0 commit comments