From 250e5a0c3521037e89ee262a231e0fde25f9e422 Mon Sep 17 00:00:00 2001 From: k8w Date: Sat, 25 Dec 2021 18:30:22 +0800 Subject: [PATCH] first-api default json: true --- examples/first-api/backend/src/index.ts | 2 +- examples/first-api/frontend/src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/first-api/backend/src/index.ts b/examples/first-api/backend/src/index.ts index 7dcc249..629c240 100644 --- a/examples/first-api/backend/src/index.ts +++ b/examples/first-api/backend/src/index.ts @@ -5,7 +5,7 @@ import { serviceProto } from "./shared/protocols/serviceProto"; // Create the Server const server = new HttpServer(serviceProto, { port: 3000, - cors: '*' + json: true }); // Entry function diff --git a/examples/first-api/frontend/src/index.ts b/examples/first-api/frontend/src/index.ts index 106f145..4203a14 100644 --- a/examples/first-api/frontend/src/index.ts +++ b/examples/first-api/frontend/src/index.ts @@ -4,7 +4,8 @@ import { serviceProto } from './shared/protocols/serviceProto'; // Create the Client let client = new HttpClient(serviceProto, { server: 'http://127.0.0.1:3000', - logger: console + json: true, + // logger: console }); async function test() {