App constructor

App({
  1. Duration? idleTimeout,
  2. int parallel = 50,
  3. bool shared = true,
  4. String? sslCertificate,
  5. String? privateKey,
  6. String? password,
})

Implementation

App({
  this.idleTimeout,
  this.parallel = 50,
  this.shared = true,
  String? sslCertificate,
  String? privateKey,
  String? password,
}) {
  // initialize
  _environment = env('ENV') ?? 'development';
  _requestQueue = Queue(parallel: parallel);
  _localData = LocalData();

  if (sslCertificate != null && privateKey != null && password != null) {
    String chain = Platform.script.resolve(sslCertificate).toFilePath();
    String key = Platform.script.resolve(privateKey).toFilePath();

    _securityContext = SecurityContext();
    _securityContext?.useCertificateChain(chain);
    _securityContext?.usePrivateKey(key, password: password);
  }
}