first-api default json: true

This commit is contained in:
k8w 2021-12-25 18:30:22 +08:00
parent ab7efb65e6
commit 250e5a0c35
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import { serviceProto } from "./shared/protocols/serviceProto";
// Create the Server // Create the Server
const server = new HttpServer(serviceProto, { const server = new HttpServer(serviceProto, {
port: 3000, port: 3000,
cors: '*' json: true
}); });
// Entry function // Entry function

View File

@ -4,7 +4,8 @@ import { serviceProto } from './shared/protocols/serviceProto';
// Create the Client // Create the Client
let client = new HttpClient(serviceProto, { let client = new HttpClient(serviceProto, {
server: 'http://127.0.0.1:3000', server: 'http://127.0.0.1:3000',
logger: console json: true,
// logger: console
}); });
async function test() { async function test() {