-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharpah.mjs
36 lines (29 loc) · 897 Bytes
/
arpah.mjs
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
26
27
28
29
30
31
32
33
34
35
36
console.log(`arphah.mjs loaded ${Date()}`)
// hello
const arpah={}
arpah.hello='world'
arpah.loadedAt=Date()
// Yjs, notes and signaling:
// https://sites.google.com/mathbiol.org/cloud4bio/2024/2024-05-01-may
class YJS {
constructor(sigServerURL){
this.loadedAt=Date()
this.sigStatus = async function(sigServerURL){
if(!sigServerURL){sigServerURL='https://yjs-demo-signaling-server-jonasalmeida.replit.app/'}
console.log('signaling server address:',sigServerURL)
let res = await (await fetch(sigServerURL)).text()
console.log('response:',res) // in case there are other responses
if(res=='okay'){
return true
}else{
return false
}
}
console.log(`new Yjs object created at\n${this.loadedAt}`)
4
}
}
export{
arpah,
YJS
}