if you want to run a microservice in nx workspace with dapr, rename the serve target to e.g. x-serve target and use nx:run-commands
executor to run dapr with the parameter yarn nx run yourproject-name:serve
Here is an example for project called timeline-microservice:
"x-serve": {
"executor": "@nrwl/js:node",
"options": {
"buildTarget": "timeline-microservice:build"
},
"configurations": {
"production": {
"buildTarget": "timeline-microservice:build:production"
}
}
},
"serve": {
"executor": "nx:run-commands",
"options": {
"commands": [
"dapr run --app-id timeline-microservice --dapr-grpc-port 51002 --app-port 53002 --app-protocol grpc --components-path ./components/ -- yarn nx run timeline-microservice:x-serve"
],
"parallel": false
}
},