This repository contains the source code for a web app that interfaces with sync-server to empower an individual to authorize his or her preferred storage and sources and manage data synchronization between them.
See also documentation for the Neotoma project.
The code requires the following environment variables to run or deploy the app. They can be declared by adding a file named .env
(in INI format) to the base directory, assuming they're not declared elsewhere in the system already. Such a file will be ignored by Git.
SYNC_WEB_API_HOST
: Host address of sync-server (e.g.127.0.0.1:9090
; required to run app).SYNC_WEB_SEGMENT_WRITE_KEY
: Segment write key (optional to run app).SYNC_WEB_DEPLOY_API_HOST
: Host address of sync-server for deployed app (required to deploy app).SYNC_WEB_DEPLOY_SEGMENT_WRITE_KEY
: Segment write key (optional to deploy app).SYNC_WEB_DEPLOY_HOST
: Host for deployment (required to deploy app).SYNC_WEB_DEPLOY_USER
: Host user for deployment (required to deploy app).SYNC_WEB_DEPLOY_DIR
: Host directory for deployment (required to deploy app).
Once the environment is ready per above, and Node.js with NPM is installed, simply run npm install
to install dependencies.
The following commands can be executed for development and deployment:
npm run build
: Builds the app in thedist
directory for development (i.e. code is not minified, among other things).npm run build-prod
: Builds the app in thedist
directory for production.npm run deploy
: Builds the app for production and deploys it to a remote host.npm run dev
: Builds the app and starts a web server for development. See output in the console for which address and port to use for testing.npm run test
: Run tests.