Skip to content

Configuration#

This project use config.json to set these variables:

  • Address (default: :5000). Server will be launched on this port. Requests should be sent to this port. Instance setup

  • Pattern (default: /). Part of URI after port: [Address][Pattern]. All requests sent to wrong Pattern will be rejected. By default server will handle requests on URI = localhost:5000/. Instance setup

  • WebhookToken (default: none). Authorization token, must be equal to a token declared in your green-api instance (none dy default) Instance setup

  • LogToFile (default: false). Defines the creation logger of a file and writing logs to it by program. Available values: true, false.

  • LogToConsole (default: false). Defines writing logs into console by program. Available values: true, false.

  • LoggerFilename (default: log.txt). Filename for logger's file.

After starting the application, a server using values from config will be started. If no config exists, default values will be used. During the application build process, the configuration file is copied to the build/bin directory. The server first looks for the file in this directory when it starts, loading config.json from the project-wide directory only if it is not in build/bin.