Skip to content

Commit

Permalink
Add optional server instance parameter to serverBuilder (closes #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
kondi committed Mar 13, 2019
1 parent 9347d54 commit 2c1841a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ export interface GenericServerBuilder<T> {
export function serverBuilder<T>(
protoPath: string,
packageName: string,
server = new grpc.Server(),
): T & GenericServerBuilder<T> {
const server = new grpc.Server();

const builder: DynamicMethods = <GenericServerBuilder<T>>{
start(address, credentials) {
server.bind(address, credentials || grpc.ServerCredentials.createInsecure());
Expand Down

0 comments on commit 2c1841a

Please sign in to comment.