Web client for the Pollin8 engine (which runs simulations of revegetation effects on pollinators)
This is only the frontend/UI. The simulation is run on the backend: natcap-invest-docker-flask.
-
ensure you have the required toolchain:
yarn 1.15
,nodejs 10.x
,docker 19.x
,docker-compose 1.24
-
clone the repo
-
install the dependencies
yarn install
-
copy the runner script (a thin wrapper that sets some env vars) and make changes to the vars if needed
cp local-dev.sh.example local-dev.sh chmod +x local-dev.sh vim local-dev.sh
-
serve with hot reload at localhost:3000
./local-dev.sh
-
clone the repo
-
copy the runner script
cp start-or-restart-stack.sh.example start-or-restart-stack.sh chmod +x start-or-restart-stack.sh
-
edit the runner script
start-or-restart-stack.sh
to define the needed sensitive environmental variablesvim start-or-restart-stack.sh
-
start the stack
./start-or-restart-stack.sh # or if you need to force a rebuild of the app ./start-or-restart-stack.sh --build
We use Ava for testing, so following their advice:
yarn global add inspect-process
# edit your code to add a 'debugger' statement
inspect node_modules/ava/profile.js test/specs/welcome.test.js
This is a pretty good experience as it will launch the Chrome window for you and you don't have to mess with breaking at the start of a run when the script you care about isn't loaded, or deal with forking processes for tests.
TODO add reasoning.
- VueJS
- Nuxt.js
- Docker
- docker-compose
- Vuetify and Bootstrap-vue, so we have the best of both