Skip to content

Commit

Permalink
destructure port, remove unnecessary imports
Browse files Browse the repository at this point in the history
  • Loading branch information
toddself committed May 21, 2019
1 parent f1bb22a commit 94a231b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/core/server/http/http_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ import { HttpConfigType, config, HttpConfig } from './http_config';
import { Config, ConfigService, Env, ObjectToConfigAdapter } from '../config';
import { loggingServiceMock } from '../logging/logging_service.mock';
import { getEnvOptions } from '../config/__mocks__/env';
import { exec } from 'child_process';
import { expectationFailed } from 'hapi/node_modules/@types/boom';
import { executionAsyncId } from 'async_hooks';
import { create } from 'domain';

const logger = loggingServiceMock.create();
const env = Env.createDefault(getEnvOptions());
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/http_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class HttpService implements CoreService<HttpServiceSetup, HttpServiceSta
}

private async createServer(config: HttpConfig) {
const port = config.port;
const { port } = config;

if (!port || this.secondaryServers.has(port)) {
throw new Error(`port ${port} is already in use`);
Expand Down

0 comments on commit 94a231b

Please sign in to comment.