- How to install?
git submodule update --init --recursive
and then
npm i
-
How to start the application?
- When using shogun2 as backend
- Set the credentials in
.shogunrc
- Start the app with
npm run start-shogun2
- Set the credentials in
- When using no backend / a static appContext
- Start the app with
npm run start-static
- Start the app with
- When using shogun2 as backend
-
To start a new project:
- Create a new folder next to the baseclient package, e.g. "myproject" and add at least a single Main class.
- Configure the project main view and configs in an
.env
file located in your project base folder, e.g. inmyproject/.env
- This
.env
file should look like
- This
## Contents of .env file
# Whether to use source map in webpack dev server or not
USE_SOURCEMAP=true
# The name of the main class
PROJECT_MAIN_CLASS=ProjectMain
# The paths !!! relative to Main Component in react-geo-baseclient/packages/baseclient/src/Main.tsx !!!
PROJECT_MAIN_PATH='../../../src/Main/'
# resources path relative to webpack config in react-geo-baseclient/packages/baseclient/config
RESOURCES_PATH='../../src/resources/'
- Place an project
package.json
which uses previously configured.env
file usingenv-cmd
, e.g.
...
"scripts": {
...
"start": "cd ../baseclient/ && env-cmd ../myproject/.env npm run start-static",
...
},
...
- When working with react-geo linked make sure to configure the alias for
ol
in the webpack.commmon.config.