Skip to content

Development environment

saragilcas edited this page Apr 18, 2024 · 7 revisions

Technology

The application has been developed using React.

Make sure you have, at least, the following versions of node and yarn (use option -v to check your current version):

  • node version v8.9.4 or higher.
  • yarn version v1.12.1 or higher.

The app request data against three servers:

  • Map server
  • Tile server
  • Xmart server

Environments

There are three environments:

  • Development
  • Staging
  • Production

The endpoints of these environments are defined at https://github.com/EyeSeeTea/malaria-threats-map/blob/development/src/webapp/config/index.tsx

Getting started

Clone the repository and install the dependencies:

Setup

$ yarn install

Build

Build for staging:

$ yarn build

Build for production:

$ yarn build-prod

Development

# Local server as backend
$ REACT_APP_BACKEND_URL=http://localhost:8080 yarn start

# Staging server as backend
$ yarn start

Tests

$ yarn test

Run integration tests locally:

$ yarn cy:open # interactive UI
$ yarn cy:run # non-interactive UI

xMart Database

Export: Go to Admin à Martà on the right side, choose data to exportà Request Export. Deployment: Then in PROD, AdminàDeployà and drop the zip in there.

This is quite useful for large scale deployments and if for example you want to bring two marts in sync. For smaller deployments you can transfer the tables and/or pipelines one by one.

Just to be on the safe side of things, before you do anything backup your PROD mart. This is easy you just follow the export procedure as described above.

Another note is that as mentioned above the export and deployment, moves everything, model, tables, pipelines etc.

Clone this wiki locally