Skip to content

Latest commit

 

History

History

web

integreat-app-web

React JS WebApp for Integreat, Malte and Aschaffenburg.

Contents

Project Setup

Make sure you read and followed the steps in the general README.

  • Run yarn in the terminal to install all dependencies.
  • Take a look at the available scripts. The most important scripts are also available as IntelliJ Run Configurations.

Run the App

  • Start a local webpack dev server:

    yarn start

  • Start coding :)

Debug the App (IntelliJ)

  • Make sure that sourceMap is set to true in the tsconfig.json.
  • Start the Debug with Chrome IntelliJ run configuration in debug mode.
  • You can now debug the webapp directly in IntelliJ.

Run the App in Production Mode

  • Create a release build:

    yarn build --env dev_server

  • Launch http-server

    python3 -m http.server -d dist/integreat

  • See results on localhost:8000

Note: Steps for other build configs differ accordingly.

Additional Configuration

  • Run > Edit Configurations > Defaults > Jest:
    • Set Configuration file to jest.config.json
  • [optional] Install the following plugins:

CMS

Testing with the production cms should be avoided!

In development builds, i.e. yarn start and the development environments, the test cms is used as default.

To change the cms, enter the following command in the console of your web browser:

window.localStorage.setItem('api-url', <cms_url>)

The cms repository can be found here. The api documentation can be found here.

Testing CMS Content

To test with content from the cms the testumgebung can be used. If you don't know how to do that, reach out to us.

Hidden Cities

Hidden cities, especially the testumgebung, can be shown by entering the search query wirschaffendas in the city selection.