rhine-var
Version:
Variables that support multi-user collaboration and persistence, making collaboration and variable operations as simple as possible, with strict and well-defined type hints.
20 lines (13 loc) • 429 B
JavaScript
import {rhineProxy, enableRhineVarLog, WebsocketConnector} from "rhine-var";
console.log('\n\n=================== Rhine Var Playground ===================\n\n')
enableRhineVarLog(true)
const state = rhineProxy({
count: 0,
}, new WebsocketConnector('ws://localhost:8080'))
state.afterSynced(() => {
console.log(++state.count)
process.exit()
})
setInterval(() => {
console.log('Waiting for sync...')
}, 1000)