File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
11
11
limitations under the License.
12
12
*/
13
13
14
- import { CommunicationProtocolEnum , DaprClient , DaprServer } from "@dapr/dapr" ;
14
+ import { DaprClient , DaprServer } from "@dapr/dapr" ;
15
15
16
16
// Common settings
17
17
const serverHost = "127.0.0.1" ; // App Host of this Example Server
@@ -23,14 +23,13 @@ async function start() {
23
23
const server = new DaprServer ( {
24
24
serverHost,
25
25
serverPort,
26
- communicationProtocol : CommunicationProtocolEnum . GRPC ,
27
26
clientOptions : {
28
27
daprHost,
29
- daprPort : process . env . DAPR_GRPC_PORT ,
28
+ daprPort : process . env . DAPR_HTTP_PORT ,
30
29
} ,
31
30
} ) ;
32
31
33
- const client = new DaprClient ( daprHost , process . env . DAPR_GRPC_PORT , CommunicationProtocolEnum . GRPC ) ;
32
+ const client = new DaprClient ( { daprHost, daprPort : process . env . DAPR_HTTP_PORT } ) ;
34
33
35
34
// Initialize the subscription. Note that this must be done BEFORE calling .start()
36
35
await server . pubsub . subscribe ( "my-pubsub-component" , "my-topic" , async ( data : Record < string , any > ) => {
You can’t perform that action at this time.
0 commit comments