1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2025-02-13 16:08:44 +00:00
code-server-2/lib/vscode/extensions/css-language-features/server/src/node/cssServerMain.ts

22 lines
974 B
TypeScript
Raw Normal View History

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createConnection, Connection } from 'vscode-languageserver/node';
import { formatError } from '../utils/runner';
import { startServer } from '../cssServer';
import { getNodeFSRequestService } from './nodeFs';
// Create a connection for the server.
const connection: Connection = createConnection();
console.log = connection.console.log.bind(connection.console);
console.error = connection.console.error.bind(connection.console);
process.on('unhandledRejection', (e: any) => {
connection.console.error(formatError(`Unhandled exception`, e));
});
startServer(connection, { file: getNodeFSRequestService() });