mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
23 lines
383 B
JavaScript
23 lines
383 B
JavaScript
const { default: dc } = require('./dist')
|
|
|
|
const ac = new dc('test123456')
|
|
|
|
ac.startJSONRPCHandler(console.log)
|
|
|
|
console.log(
|
|
ac.jsonRPCRequest(
|
|
JSON.stringify({
|
|
jsonrpc: '2.0',
|
|
method: 'get_all_account_ids',
|
|
params: [],
|
|
id: 2,
|
|
})
|
|
)
|
|
)
|
|
|
|
setTimeout(() => {
|
|
ac.close() // This segfaults -> TODO Findout why?
|
|
|
|
console.log('still living')
|
|
}, 1000)
|