Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 2.07 KB

README.md

File metadata and controls

56 lines (35 loc) · 2.07 KB

S4E Frontend

This readme contains information about setting up and developing Sat4Env frontend.

Requirements

  • nodejs 14.18.1
  • npm ^6

Setting up development environment

To install all dependencies run:

npm install

Running application

This application requires backend to be working, refer to the general documentation about running it and all related services here

Application is written in angular so all standard ng commands will work, but for convenience npm scripts has been defined:

  • npm start starts development server with proxy to backend and HMR enabled.
  • npm run extract-i18n extracts translation string from the application

So to start application for development run:

npm start

NOTICE: Local web server will be available on https://localhost:4200/, and it will start with /api route proxied to http://localhost:4201, where backend should be present.

Other important information

Application is written in Angular 7+, with support for ReduxDevTools via Akita Store

Testing

Unit tests use JEST framework integrated with angular via @angular-builders/jest. For E2E cypress.io is used.

Build

Run ng build to build the project. The build artifacts will be stored in the target/ directory. Use the --prod flag for a production build.

Running ng build --prod may fail due to a bug in either angular-cli or openlayers: openlayers/openlayers#8357. Makeshift fix is to remove sideEffects property from node_modules/ol/package.json as described in the github issue.

When building with mvn, you can customize the run-script build execution's argument. By default, it runs the script build, but you can override it with an environment variable NPM_BUILD_RUN_SCRIPT_ARG, e.g., NPM_BUILD_RUN_SCRIPT_ARG=build-private ../mvnw package.