flexsearch-server icon indicating copy to clipboard operation
flexsearch-server copied to clipboard

Unable to use HTTPS locally

Open samdutton opened this issue 5 years ago • 1 comments

Firstly — great work. Thanks for building this.

I'm attempting to run flexsearch-server locally using HTTPS.

I've created certificates, following the instructions at letsencrypt.org/docs/certificates-for-localhost.

I've renamed the files from localhost.crt to development.crt and from localhost.key to development.pem and copied them to both /cert:

/cert/development.crt
/cert/development.pem

and /certs:

/certs/development.crt
/certs/development.pem

(The console message refers to /certs and the documentation refers to /cert.)

However, I continue to get the following error when running npm run development:

Could not find certificates located at: /certs. Therefore HTTPS server can't initialize.

Any ideas? FlexSearch Server runs fine from localhost over HTTP.

samdutton avatar Mar 31 '20 19:03 samdutton

Did some digging in the code.

server.js from line 96 looks for the certificates in "../../cert/".

Is this correct? Works for me if I change the path to "./cert/".

samdutton avatar Apr 02 '20 14:04 samdutton