lwr start|preview
To preview your site in its target environment after you successfully run lwr build
, run lwr start
or lwr preview
.
If you run this command without a prebuilt directory, it'll default to the standard LWR standalone server and it won't use any statically generated content.
Option | Type | Required/Optional | Description |
---|---|---|---|
-p , --port <port> | Number | Optional | Set the port for the local development server. If a port isn't specified, the default value is 3000 . |
-m , --mode <mode> | String | Optional | Set the server mode. If a server mode isn't specified, the default value is dev . Accepted values are dev , compat , prod-compat , and prod . |
-t , --target <target> | String | Optional | Set the site deployment target. If a target isn't specified, the default value is default . Accepted values are:
|
-b , -buildDir <directory> | String | Optional | Specify the prebuilt directory for your static site. |
-o , --open | Boolean | Optional | Open the static site in the browser on startup. By default, the browser doesn't open on startup. |
-h , --help | Optional | View help text for lwr start and lwr preview options in the CLI. |