flexsearch-server
flexsearch-server copied to clipboard
Unable to use HTTPS locally
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.
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/".