Giter Site home page Giter Site logo

cnxtech / sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brave/sync

0.0 1.0 0.0 2.91 MB

cross platform, client encrypted, cloud data sync ๐Ÿ”ผโœจ๐Ÿ”ฎโœจ๐Ÿ”ผ

License: Mozilla Public License 2.0

JavaScript 99.87% HTML 0.07% Shell 0.06%

sync's Introduction

Brave Sync

Build Status

A client/server for Brave sync

Building

Install dependencies:

npm install

Build a bundled JS library for the client:

npm run build

Run the server:

npm run start

Testing

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 client and navigate to http://localhost:8000/). The page should not show any 'ERROR' messages and should end with 'success'.

Development

Server

server/config contains settings; defaults in defaults.json and environment variable mappings in custom-environment-variables.json.

To configure locally you can create a file config-dev.sh and source config-dev.sh when needed:

#!/bin/bash
export AWS_ACCESS_KEY_ID="{stuff}"
export AWS_SECRET_ACCESS_KEY="{secret stuff}"

Run the server with file watching and autoreloading:

npm run start-dev

Client integration

To integrate Brave sync on a platform (iOS, Android, Laptop):

  1. Make a new branch.
  2. In the main browser process, implement an IPC message handler as specified in client/constants/messages.js.
  3. If webviews on your platform do not support chrome.ipcRenderer.{send, on}, edit client/polyfill/chrome.js as needed to polyfill this functionality.

Building for browser-laptop

  1. Make sure this repo is checked out next to browser-laptop/
  2. Checkout the feature/syncing branch in browser-laptop
  3. npm run dist
  4. If developing, do npm start in browser-laptop. Console messages from the sync client will be logged in Library/Application Support/brave-development/chrome-debug.log.

Tests

To run tests you need to configure these environment variables:

  • AWS_REGION
  • AWS_S3_BUCKET
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

sync's People

Contributors

diracdeltas avatar ayumi avatar sergeyzhukovsky avatar alexeybarabash avatar darkdh avatar bsclifton avatar cezaraugusto avatar evq avatar samartnik avatar jumde avatar dependabot[bot] avatar bbondy avatar dchest avatar domoritz avatar hspencer77 avatar nejczdovc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.