Skip to content

Commit

Permalink
Issue #2: allow to connect via stdio
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed May 29, 2017
1 parent d15a0a2 commit 8379a71
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ namespace VSCodeContentRequest {
let pendingValidationRequests: { [uri: string]: NodeJS.Timer; } = {};
const validationDelayMs = 200;

// Create a connection for the server. The connection uses Node's IPC as a transport
let connection: IConnection = createConnection(new IPCMessageReader(process), new IPCMessageWriter(process));
// Create a connection for the server.
let connection: IConnection = null;
if (process.argv.indexOf('--stdio') == -1) {
connection = createConnection(new IPCMessageReader(process), new IPCMessageWriter(process));
} else {
connection = createConnection();
}

// Create a simple text document manager. The text document manager
// supports full document sync only
Expand Down

0 comments on commit 8379a71

Please sign in to comment.