The Bubble web UI in VueJS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.6 KiB

3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. bubble-web
  2. ==========
  3. Bubble frontend VueJS web application
  4. The initial basis for the bubble-web frontend was Jason Watmore's wonderfully well-written
  5. [Vue/Vuex Registration and Login Example](https://jasonwatmore.com/post/2018/07/14/vue-vuex-user-registration-and-login-tutorial-example).
  6. The [LICENSE](vue-vuex-registration-login-example-docs/LICENSE) and [README.md](vue-vuex-registration-login-example-docs/README.md)
  7. files for this code are in the [vue-vuex-registration-login-example-docs](vue-vuex-registration-login-example-docs) directory.
  8. # Install Requirements
  9. If you've ever built the Bubble API jar, you have already run `npm install` and can skip this step.
  10. If you're not sure, it's safe to run again. In the `bubble-web` directory, run:
  11. ```shell script
  12. npm install
  13. ```
  14. # Build the Webapp
  15. Bubble uses [npm](https://www.npmjs.com/) and [webpack](https://webpack.js.org/)
  16. to build the Bubble VueJS webapp.
  17. In the `bubble-web` directory, run this to build the webapp:
  18. ```shell script
  19. npm run build
  20. ```
  21. The output files will be in the `bubble-web/dist` directory.
  22. To perform a development build (for example, so the VueJS firefox/chrome plugin will work), run:
  23. ```shell script
  24. npm run dev-build
  25. ```
  26. # Run Webapp with a Remote Bubble API Server
  27. To connect to a remote Bubble API, set the `BUBBLE_API` environment variable and run:
  28. ```shell script
  29. BUBBLE_API=https://bubble-api.example.com/api npm run start
  30. ```
  31. This will run a local web server where you can use the webapp. The local web server will
  32. proxy API calls to the remote Bubble API server.
  33. # Run Webapp with a Local Bubble API Server
  34. To run the backend API locally, run this from the `bubble` directory (one level above `bubble-web`):
  35. ```shell script
  36. ./bin/run.sh
  37. ```
  38. If this is the first time you have run the Bubble API, you will need to
  39. [activate](https://git.bubblev.org/bubblev/bubble/src/branch/master/docs/activation.md) it.
  40. ## Enable Hot Reloading
  41. If you have a Bubble API running locally, you can update the web UI without restarting
  42. the server.
  43. Set the `BUBBLE_ASSETS_DIR` environment variable in the Bubble environment file to be the
  44. path to the `bubble-web/dist` directory, then start the API server. It will serve static
  45. assets from that directory, so you can update the webapp just by overwriting those files
  46. via `webpack`.
  47. To enable hot reloading: in your `${HOME}/.bubble.env` file, add this line (fix the path
  48. to point to the correct location of your `bubble-web/dist` directory):
  49. ```shell script
  50. export BUBBLE_ASSETS_DIR=/path/to/bubble-web/dist
  51. ```
  52. You can now use and test the frontend.
  53. If you make changes to the frontend code, you can simply run `webpack` again and
  54. reload the page in your browser.