forked from TypeFox/monaco-languageclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
25 lines (24 loc) · 1 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { runLanguageServer } from '../../common/language-server-runner.js';
import { resolve } from 'path';
import { LanguageName } from '../../common/server-commons.js';
export const runJsonServer = (baseDir: string, relativeDir: string) => {
const processRunPath = resolve(baseDir, relativeDir);
runLanguageServer({
serverName: 'JSON',
pathName: '/sampleServer',
serverPort: 30000,
runCommand: LanguageName.node,
runCommandArgs: [
processRunPath,
'--stdio'
],
wsServerOptions: {
noServer: true,
perMessageDeflate: false
}
});
};