forked from TypeFox/monaco-languageclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tsx
21 lines (19 loc) · 882 Bytes
/
main.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2018-2022 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 React from 'react';
import ReactDOM from 'react-dom/client';
import { ReactMonacoEditor } from './app.js';
export const startReactJsonClient = () => {
const defaultCode = `{
"$schema": "http://json.schemastore.org/coffeelint",
"line_endings": "unix"
}`;
const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(<ReactMonacoEditor
defaultCode={defaultCode}
hostname={'localhost'}
path={'/sampleServer'}
port={30000} />);
};