Skip to content

Latest commit

 

History

History
46 lines (43 loc) · 3.3 KB

docs-debugging.md

File metadata and controls

46 lines (43 loc) · 3.3 KB

# Debugging

Here you can find help with debugging the project.

Back to the main page.

Debugging

To test the portions of the web-site that isn't directly connected to the gh-pages generation and Asciidoc conversion, you may want to start it using VSCode. Just do the following:

  • clone this repository
  • open it in VSCode
  • open a terminal window
  • npm install
  • npm run start (the contents of the start-script are located in the package.json file)
  • Just press F5 to start debugging, while the webserver is running in the background You can use the built-in debugger now.

The following files are changed or omitted in the build-process:

FILE DESCRIPTION
.env -> pipeline
Will be re-generated from scratch during the pipeline-run using Github secrets.
Code is located in this repository in the yml file of the action.
keycloak.json -> pipeline
Will be generated from scratch during the pipeline-run using Github secrets.
So you're free to place a debugging-file of your own in here. The one that is present connects you to a test-server and will most likely not work with your fork.
package.json
package-lock.json
-> 'Dockerfile'
These files will be copied during the pipeline-run's Docker-Image generation and used to setup the web-server in the Docker container by running npm install afterwards.
app.js -> 'Dockerfile'
Is the start-file for the NodeJS server and will be copied during the pipeline-run's Docker-Image generation.
all other files... Will be ignored by the build-pipeline.

HttpYac (REST-Tests)

In order to get those working, you'll have to create a file httpyac.config.js with the following contents:

// Configuration file for HttpYac.
// A plugin for VSCode.
module.exports = {
  log: {
    supportAnsiColors: true
  },
  cookieJarEnabled: true,
  envDirName: 'env',
  environments: {
    $default: {
      url: 'http://localhost:8080',
      oidc: 'https://keycloak-server/auth/realms/test/protocol/openid-connect/token',
      userName: 'username',
      password: 'password'
    }
  }
}

Then you can run the REST-examples in the http directory.