add http listener to websocket-server

This commit is contained in:
Kevin Jahns
2018-11-26 13:08:23 +01:00
parent 539fa8b21d
commit 12d43199d5
2 changed files with 18 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import * as Y from '../index.mjs'
import { WebsocketProvider } from '../provider/websocket.mjs'
import { TextareaBinding } from '../bindings/textarea.mjs'
const provider = new WebsocketProvider('ws://35.246.255.92:1234')
const provider = new WebsocketProvider('ws://localhost:1234')
const ydocument = provider.get('textarea')
const type = ydocument.define('textarea', Y.Text)
const textarea = document.querySelector('textarea')