Skip to content

Commit c432ead

Browse files
committed
fix typo
Signed-off-by: MregXN <[email protected]>
1 parent a80accd commit c432ead

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/pubsub/src/index.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
1313

14-
import { CommunicationProtocolEnum, DaprClient, DaprServer } from "@dapr/dapr";
14+
import { DaprClient, DaprServer } from "@dapr/dapr";
1515

1616
// Common settings
1717
const serverHost = "127.0.0.1"; // App Host of this Example Server
@@ -23,14 +23,13 @@ async function start() {
2323
const server = new DaprServer({
2424
serverHost,
2525
serverPort,
26-
communicationProtocol: CommunicationProtocolEnum.GRPC,
2726
clientOptions: {
2827
daprHost,
29-
daprPort: process.env.DAPR_GRPC_PORT,
28+
daprPort: process.env.DAPR_HTTP_PORT,
3029
},
3130
});
3231

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 });
3433

3534
// Initialize the subscription. Note that this must be done BEFORE calling .start()
3635
await server.pubsub.subscribe("my-pubsub-component", "my-topic", async (data: Record<string, any>) => {

0 commit comments

Comments
 (0)