javascript jira-client包:设置主机时如何指定端口

javascript jira-client package: how to specify a port when setting the host

jira-client 在未指定端口时工作正常,但我需要访问使用端口的 Jira 实例。有人知道怎么做吗?也许是环境变量?

const JiraApi = require('jira-client');
const jira = new JiraApi({
    protocol: 'https',
    host: 'greenhopper.app.company.com:8080',
    ...
});

很遗憾,库报错:

cause: Error: getaddrinfo ENOTFOUND greenhopper.app.company.com:8080

创建Jira客户端时可以设置端口

jira = new JiraApi({
    protocol: 'https',
    host: config.host,
    port: config.port, // Here
    apiVersion: 'latest',
    strictSSL: true,
    oauth: oauthConfig
});

以下是 code-jira-client docs

中的所有选项