Developer Manual

Exporting a web-app

How to export a web-app and bundle all assets

  1. set cloudBaseUrl: '/' in the cloudClient init function
  2. Set homepage property in package.json. This is the folder where the web-app build will be uploaded, eg for the view app it will be /view
  3. npm run build
  4. npm run sync projectId where projectId is the mongoDB id of the synced project. This will create a cloud/ folder in the previously generated build/ directory, containing all assets as well as a docs.json file with all the cloud docs and type definitions
  5. Build xx-packages (make sure you first comment out any unused imports in src/index.js ), then copy that build folder to the build folder generated in 3.
  6. update path to xx-packages.js and xx-packages.css in build/index.html to reference the files copied in 5.