Skip to content

Commit 426f382

Browse files
committed
fix socket Url
1 parent 8f069c9 commit 426f382

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

demo/src/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ import './App.css'
66
function App() {
77

88
const monacoRef = useRef<HTMLDivElement>(null)
9+
const socketUrl = 'ws://' + window.location.hostname + ':8080/'
10+
console.log(`[demo]: socketUrl`, socketUrl)
911
const [options, setOptions] = useState<LeanMonacoOptions>({
1012
websocket: {
11-
url: 'ws://localhost:8080/'
13+
url: socketUrl
1214
},
1315
vscode: {
1416
// The default options are defined in `LeanMonaco.start` and can be overwritten here.

0 commit comments

Comments
 (0)