Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.65 KB

readme.md

File metadata and controls

65 lines (43 loc) · 1.65 KB

Video Center Blueprint

Live, live-to-VOD, and video serving blueprint on CrafterCMS.

Installation

  1. Install yarn
  2. Run yarn

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn build

Builds the app for production to the site static-assets folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Site Configuration

React Dev Server

  1. Configure the previewServer property in the site configuration file, this can be done from Studio or changing directly /config/studio/site-config.xml:

    <previewServer>http://localhost:3000</previewServer>
    
  2. Configure the dev server to proxy API calls to Engine, in package.json add the following configuration:

"proxy": {
  "/api": {
    "target": "http://localhost:8080"
  },
  "/static-assets": {
    "target": "http://localhost:8080"
  }
}

Using this configuration Crafter Studio preview will show the react dev server and it will support hot reload when the js sources are changed.

To use the dev server directly without Studio you will need to set a cookie with the site name:

crafterSite={siteName}

TBD: Add docs on how to configure Box & AWS profiles.