# Node Launch options

Running the development server:

To launch the development server run the following command:

$ npm run dev -s

Running the development server on remote host:

Assuming your IP is 1.2.3.4, run the development server like so (the Webpack development server will listen on the external IP):

$ WP_HOST=1.2.3.4 npm run dev -s

Run the development server with Sourcemaps enabled:

Sourcemaps are disabled by default as it slows down the build time. However, if you would like to have sourcemaps support enabled for both client and server run the following command:

$ SOURCEMAP=true npm run dev -s

Running development server with RTL support:

RTL support is disabled by default. To enable RTL support run the following command:

$ npm run dev:rtl -s

Build production assets:

To build production assets (JS/CSS/Fonts) run the following command:

$ npm run build:prod -s

Build production assets with RTL support:

RTL support is disabled by default. To enable RTL support and build for production run the following command:

$ npm run build:prod:rtl -s

Build production assets and run production server:

To build production assets (JS/CSS/Fonts) and also launch the production server run the following command:

$ npm run prod -s

Build production assets and run production server with RTL support:

To build production assets (JS/CSS/Fonts) and also launch the production server with RTL support run the following command:

$ npm run prod:rtl -s

Build client only assets (JS/CSS/Fonts):

To build client only assets run the following command:

$ npm run bundle:client -s

Build server.js from server.babel.js:

To build server.js run the following command:

$ npm run bundle:server -s

Create a distributable:

To create a distributable run the following command (will also generate a RTL version):

$ npm run dist -s

Create a distributable with different path:

To create a distributable with different path run the following command:

$ DIST_PATH=/path/to/project/static npm run dist -s

Create a distributable with file watcher:

Start a file watcher that watches for file changes and builds a new distributable:

$ npm run dev:dist -s

Cleaning the Build files:

To clean the build files run the following command:

$ npm run clean -s

Running tests:

To run tests execute the following command:

$ npm run test -s