遵循https://sync.objectbox.io/objectbox-sync-server中的指南
我已经有我下载的 Objectbox 同步服务器文件
- 下载我的 Objectbox 同步服务器文件(我从 Objectbox Team 获得)并解压
- 将我的 objectbox-model.json(从我的颤振应用程序生成的文件)复制到提取的文件夹中
尝试
./sync-server --model=objectbox-model.json --unsecure-no-authentication
它给了我
001-16:08:29.6169 [INFO ] [SySvAp] Starting ObjectBox Sync Server version 2
(protocol version: 3, core: 2.9.2-2021-07-19 (SyncServer, admin, tree, dlog))
error parsing options: Option ‘unsecure-no-authentication’ does not exist
创建配置文件 (sync-server-config.js) 包含:
{ "dbDirectory": "objectbox", "dbMaxSize": "100G", "modelFile": "objectbox-model.json", "bind": "ws://0.0.0.0:9999", "browserBind": "http://127.0.0.1:9980", "browserThreads": 4, "certificatePath": "", "auth": { "sharedSecret": "<secret>", } }
并从该文件夹打开终端运行 ./sync-server
它返回我错误
001-16:35:51.9701 [INFO ] [SySvAp] Starting ObjectBox Sync Server version 2 (protocol version: 3, core: 2.9.2-2021-07-19 (SyncServer, admin, tree, dlog)) 001-16:35:51.9702 [INFO ] [SySvAp] Loading configuration file sync-server- config.js Error loading configuration file sync-server-config.js - Invalid JSON at 283 - Missing a name for object member..
我确实尝试过
certificatePath": "",
删除,也给出同样的错误
我是 Objectbox 的新手,我想尝试使用同步部分,
您的帮助将不胜感激。谢谢