Skip to content

Running Beestream

Gurney Buchanan edited this page May 1, 2018 · 2 revisions

1. NPM Scripts

BeeStream uses NPM scripts in order to run. If you want some details on NPM Scripts check out this page. BeeStream provides a few scripts that I will overview below:

  1. app - this script runs the application without re-building.
  2. start - this script runs the watch:build script and the watch:server script concurrently. This is the best script if you are developing BeeStream because it will watch for changes and rebuild and restart.
  3. watch:build - watches for changes and rebuilds if changes are detected
  4. watch:server - watches for changes to the build and restarts the application if changes are detected
  5. build - this runs build once. This is often preferable so you can manually run npm run build and then npm run app
  6. pbuild - this is the same as build only it builds in production mode (thus the p).

2. Building and Running the Application

You don't need to build the application if you didn't change client-side code!

Server Deployment

If you are deploying the application to a server, make sure you've completed the configuring Beemon segment to your satisfaction.

To build and run the application, run the npm run build command, wait for it to finish, and then run the npm run app command.

Development

If you are going to be developing the application, you likely don't need any configuration changes.

You likely want to build and run the application in watch mode, so that it watches for code changes and re-builds and restarts. To do this, run npm start.

3. Development and Production Modes

To change the mode of the application, use the following command on Linux:

export NODE_ENV=<PRODUCTION OR DEVELOPMENT>

Development mode is best for development purposes, production mode should be set for any publicly accessible site.

Clone this wiki locally