Skip to content

How to enable HTTPS ? #3

@joce007

Description

@joce007

Hi,

I am currently evaluating the OrgChartJS library including the export-service. It is a really great tool including the export-service and we are looking for buying licenses. Therefore, I have a hard time setting the export-service to support HTTPS requests. I am not sure if this is the same issue as describe in this post: BALKANGraph/OrgChartJS#289 but I don't see how the fix could solve my issue.

I've tried to use the lastest source code and I am not able to make it works. Not sure if I'm doing this right or misunderstands how it should works. Based on the source code of https://github.com/BALKANGraph/export-service/blob/master/app.js, I don't see where we enable HTTPS on Express to support it. And also where the certificates and keys are extracted ?

I would have assume seeing something like this:

const express = require('express');
const app = express();
var http = require('http');
var https = require('https');
var privateKey  = fs.readFileSync('server.key', 'utf8');
var certificate = fs.readFileSync('server.crt', 'utf8');
var credentials = {key: privateKey, cert: certificate};

var httpServer = http.createServer(app);
var httpsServer = https.createServer(credentials, app);
httpServer.listen(port);
httpsServer.listen(sslport);

I would need advice on how to set this up! Without this capability, it would be hard for us to recommend this tool.

Thanks!

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