gun-db
gun-db copied to clipboard
Server is starting but writes on the old radata files
This is the code:
teo@teo:~/gun$ cat sqlGunServer.js
var Gun = require('gun');
require('gun-db');
const http = require('http');
var server = http.createServer().listen(9191,'0.0.0.0');
var gun = Gun({
web:server,
file: false // turn off pesky file.js data.json default
, db: {
file: "sqliteGun.db",
exclusive : false // default
}
});
Started it with
teo@teo:~/gun$ npm version
{
npm: '9.6.5',
node: '14.20.1',
v8: '8.4.371.23-node.87',
uv: '1.42.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.18.1',
modules: '83',
nghttp2: '1.42.0',
napi: '8',
llhttp: '2.1.6',
openssl: '1.1.1q',
cldr: '40.0',
icu: '70.1',
tz: '2021a3',
unicode: '14.0'
}
teo@teo:~/gun$ cat package.json
{
"dependencies": {
"gun": "^0.2020.1239",
"gun-db": "^1.0.571"
}
}
teo@teo:~/gun$ node sqlGunServer.js
Hello wonderful person! :) Thanks for using GUN, please ask for help on http://chat.gun.eco if anything takes you longer than 5min to figure out!
Hello wonderful person! :) Thanks for using GUN, feel free to ask for help on https://gitter.im/amark/gun and ask StackOverflow questions tagged with 'gun'!
AXE relay enabled!
Multicast on 233.255.255.255:8765
The sqlite file sqliteGun.db was not even created, I created it by hand, nothing goes into it, found my new added data in the radata/ files there.
Ya looks like it's conflicting with gun version... that this is pulling a version different from the other app (hence the duplicate gun greeting)...
So the solution is to .... ?
Well; many breaking changes happened in the core; you can go back to a 2019 version instead of 2020... I'll have to see if I can get some info to update the code.