Home:ALL Converter>Nx Workspace - How can I serve an angular project as https

Nx Workspace - How can I serve an angular project as https

Ask Time:2020-09-03T00:50:07         Author:ciantrius

Json Formatter

I have an nx workspace with an angular project and a nestjs backend, it's all compiling and working fine. I have a requirement now to host the angular app locally using https for development, for this I would usually do:

ng serve ui --ssl --ssl-key ./local-cert/localhost.key --ssl-cert ./local-cert/localhost.crt

however with nx I want to run both the api and ui projects at the same time, for that I use:

nx run-many --projects=api,ui --target=serve --parallel

I tried appending the --ssl parameters to the run-many and the nestjs project failed to load. How can I pass these parameters to just the angular UI app ?

Author:ciantrius,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/63710089/nx-workspace-how-can-i-serve-an-angular-project-as-https
yy