Skip to content
Permalink
Browse files
Update build/development instructions for server landingpage webapp
  • Loading branch information
pathmapper authored and nyalldawson committed Jan 12, 2022
1 parent e162295 commit 718f80e3e8109c0430582c026dbdbc5ce80a5b33
Showing with 29 additions and 17 deletions.
  1. +5 −2 INSTALL.md
  2. +24 −15 resources/server/src/landingpage/README.md
@@ -192,11 +192,12 @@ See [debian-ubuntu](https://qgis.org/en/site/forusers/alldownloads.html#debian-u
currently supported distributions (plain xenial's GDAL for instance is too old
and we build with GDAL2 from ubuntugis).

To build QGIS server landingpage webapp additional dependencies are required:
To build [QGIS server landing page/catalog webapp](https://docs.qgis.org/latest/en/docs/server_manual/services.html#qgis-server-catalog) additional dependencies are required:

Node.js (current LTS recommended): https://nodejs.org/en/download/<br>
Yarn Package Manager: https://yarnpkg.com/getting-started/install

Additionally, the cmake flag `WITH_SERVER_LANDINGPAGE_WEBAPP` needs to be turned on.

## 3.4. Setup ccache (Optional, but recommended)

@@ -441,12 +442,14 @@ To build QGIS server additional dependencies are required:
dnf install fcgi-devel
```

And for building QGIS server landingpage webapp:
And for building [QGIS server landing page/catalog webapp](https://docs.qgis.org/latest/en/docs/server_manual/services.html#qgis-server-catalog):

```bash
dnf install nodejs yarnpkg
```

Additionally, the cmake flag `WITH_SERVER_LANDINGPAGE_WEBAPP` needs to be turned on.

Make sure that your build directory is completely empty when you enter the
following command. Do never try to "re-use" an existing Qt5 build directory.
If you want to use `ccmake` or other interactive tools, run the following
@@ -1,28 +1,37 @@
# Landing page/catalog
# Landing page/catalog webapp

Landing page/catalog app source code.
[Landing page/catalog webapp](https://docs.qgis.org/latest/en/docs/server_manual/services.html#qgis-server-catalog) source code.

## Project setup
```
yarn install
```
## Building

### Compiles and hot-reloads for development
```
yarn serve
```
To build the QGIS server landingpage webapp additional dependencies are required:

Node.js (current LTS recommended): https://nodejs.org/en/download/<br>
Yarn Package Manager: https://yarnpkg.com/getting-started/install

To build the webapp along with QGIS server just turn the cmake flag `WITH_SERVER_LANDINGPAGE_WEBAPP` on and build as you would normally do.

To test the webapp with a local QGIS project after your build is finished, set the [environment variable](https://docs.qgis.org/latest/en/docs/server_manual/config.html#environment-variables) for your project directory and run the [development server](https://docs.qgis.org/latest/en/docs/server_manual/development_server.html):

### Compiles and minifies for production
```
yarn build
export QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES=/path/to/projectdirectory
./output/bin/qgis_mapserver -p /path/to/projectdirectory/test.qgz
```

Built files location: `../../api/ogc/static/landingpage/`
Then open the web browser on http://localhost:8000 (for default port `8000`).


## Development

Development could be done by modifying the source code and building and running the webapp as described above.

If you want to run `yarn install` manually, e.g. to update `yarn.lock` please make sure to remove the `node_modules` directory from your QGIS source tree before running cmake and building. The same accounts for removing the `landingpage` directory from `resources/server/api/ogc/static/` after running `yarn build` manually.

### Lints and fixes files
#### Lints and fixes files
```
yarn lint
```

### Customize configuration
#### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

0 comments on commit 718f80e

Please sign in to comment.