Closed Reg93 closed 1 year ago
Hi @Reg93 ,
as of now, there is no out of the box support for https.
When using the ExpressApiServer component, the server is created here: https://github.com/axa-group/nlp.js/blob/b9f04e9fd12bd83f8abdf4a3946779d9b939e42c/packages/express-api-server/src/express-api-server.js#L79-L82 What you can do, is to create a custom component, extending the current ExpressApiServer, and overwrite the start method to create an HTTPS server instead of the default HTTP one (you can check the express method docs on that listen method for more details (https://github.com/expressjs/express/blob/8368dc178af16b91b576c4c1d135f701a0007e5d/lib/application.js#L612-L636).
Finally, just register your plugin instead of the ExpressAPIServer one.
OR
Modify the current ExpressApiServer so that it supports both modes, and contribute with the change :grimacing:
This was intentional by design. Usually, you'll deploy into a cloud, and the certificates will be managed, so you don't really need to have the cert management in the development. If you are deploying on-premise, you usually configure a reverse proxy like Nginx, which already will take care of the certs.
This was intentional by design. Usually, you'll deploy into a cloud, and the certificates will be managed, so you don't really need to have the cert management in the development. If you are deploying on-premise, you usually configure a reverse proxy like Nginx, which already will take care of the certs.
Thank you!
Hello! I checked other issues but didn't find where https is mentioned. Is there options which can make server work on https? I have such code in project now