---
schema_version: "1"
id: 76ca15edbfe6fce05a553918c613d24babd90f5e4bc3fa6e8a0fce286909b33b
title: lwr start|preview
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lwr-node/lwr/references/lwr-start-lwr-preview.md
canonical_url: https://developer.salesforce.com/docs/platform/lwr/references/cli-reference/lwr-start-lwr-preview.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d5de0742e3372ea72c343e60c53fb547efe220dae143f33fac74cfb441e12613
products:
  - Lightning Web Runtime
---
# 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](https://developer.salesforce.com/docs/platform/lwr/references/guides/lwr-configure-project.md#configure-the-port-and-server) 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](https://developer.salesforce.com/docs/platform/lwr/references/guides/lwr-get-started.md#set-the-lwr-server-modes). 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: <ul><li>`default` - Generates the static site wouthout any configuration options.</li><li>`mrt` - Generates the static site with a [Managed Runtime configuration.](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/mrt-overview.html)</li><li>`netlify` - Generates the static site with a Netlify configuration.</li></ul> |
| `-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.                                                                                                                                                                                                                                                                                                                                                                                                        |
