Skip to content

Server listen callback with https #1143

@barto-

Description

@barto-

I would like a callback when the server is listening. This is possible with http but it doesn't work with https.

Example:

// ...
var proxyServer = httpProxy.createServer({
  ssl: {
    key: fs.readFileSync('valid-ssl-key.pem', 'utf8'),
    cert: fs.readFileSync('valid-ssl-cert.pem', 'utf8')
  },
  target: 'https://localhost:9010',
  secure: true // Depends on your needs, could be false.
});

proxyServer.listen(443, function listening(err){
  console.log('Server listening');
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions