deprecated Brave sync server. (sync now uses a fork of the Chromium sync protocol.)
A client/server for Brave sync
Install dependencies:
npm install
Build a bundled JS library for the client:
npm run build
Run the server:
npm run start
The sync client uses Browserify to transform Node js into browser js. To unittest the library in a browser (default: electron), run
npm run browsertest. To test in a different browser run
npm run browsertest -- --browser chrome. Results appear in both the browser inspector and your terminal.
To run tests in Node, just do
npm test.
To do a basic client/server integration test against the production server, run
npm run clientand navigate to
http://localhost:8000/). The page should not show any 'ERROR' messages and should end with 'success'.
server/configcontains settings; defaults in defaults.json and environment variable mappings in custom-environment-variables.json.
To configure locally you can create a file
config-dev.shand
source config-dev.shwhen needed:
#!/bin/bash export AWS_ACCESS_KEY_ID="{stuff}" export AWS_SECRET_ACCESS_KEY="{secret stuff}"
Run the server with file watching and autoreloading:
sh npm run start-dev
To integrate Brave sync on a platform (iOS, Android, Laptop):
client/constants/messages.js.
chrome.ipcRenderer.{send, on}, edit
client/polyfill/chrome.jsas needed to polyfill this functionality.
browser-laptop/
feature/syncingbranch in browser-laptop
npm run dist
npm startin browser-laptop. Console messages from the sync client will be logged in
Library/Application Support/brave-development/chrome-debug.log.
To run tests you need to configure these environment variables: