×
Back to book

Running SpringBot 0.3.0.0

A temporary fix for v0.3.0.0 of SpringBot so that the client-side is served correctly

If you have mapped you local drive or directory into your virtual machine (Drive Mapping), then you will need to update a few files for your application client-side to be served correctly.

  1. Navigate to your projects clientside directory, enter: cd /data/local/[projectname]/clientside

  2. Edit the angular.json file:

sudo nano angular.json
  1. Within the JSON object, find the projects > architect > build > options section.
{
    ...
  "projects": {
            ...
      "architect": {
        "build": {
          "options": {
          },
                    ...
}
  1. At the end of the options section, add the following property:
"preserveSymlinks": true
  1. In the styles array, add these two lines:
"node_modules/@ng-select/ng-select/themes/default.theme.css",
"node_modules/ng-pick-datetime/assets/style/picker.min.css"
  1. The final build section should look like this:
"build": {
  "builder": "@angular-devkit/build-angular:browser",
  "options": {
    "outputPath": "../serverside/src/main/resources/static",
    "index": "src/index.html",
    "main": "src/main.ts",
    "polyfills": "src/polyfills.ts",
    "tsConfig": "src/tsconfig.app.json",
    "assets": [
      "src/favicon.ico",
      "src/assets"
    ],
    "styles": [
      "src/styles.scss",
      "node_modules/@ng-select/ng-select/themes/default.theme.css",
      "node_modules/ng-pick-datetime/assets/style/picker.min.css"
    ],
    "scripts": [],
    "es5BrowserSupport": true,
    "preserveSymlinks": true
  },
  1. Press CTRL-X then Y to save and quit

  2. Now edit src/styles.scss.

sudo nano src/styles.scss
  1. Comment out the two imports for the CSS we just put into the angular.json:
// @import "~@ng-select/ng-select/themes/default.theme.css";
// @import "~ng-pick-datetime/assets/style/picker.min.css";
  1. Press CTRL-X then Y to save and quit

Your project should now be ready to serve up the client-side.