bridg-data-sync-revention v0.0.19
Bridg Data Sync Node.js Client
Configuration
Configuration is stored in the /config directory.
default.json
is to contain application specific configuration that is client independent.local.json
is to contain client-specific configuration, and should not be added to version control
Running
Package and distribute the project along with the node_modules
directory and the local.json
that has been filled with client-specific IAM keys, installation directory, location ID, and database credentials.
Once copied over to the host system, run the process with node index.js
.
Packaging the project can be done with npm pack
. This will create bridg-data-sync-*.tgz
, which contains the source code,
and whatever node modules specified in package.json > bundledDependencies
.
The package can then be distributed with client-specific NSIS installer scripts located in bridg-config
Testing
npm run test
on your development machine. NPM will likely not be installed on the host system, so do this on the dev machine.
Other Notes
The /deploy directory has a utility taken from lollyrock.com for encrypting and decrpyting, and a minifier to obfuscate it before deploying.
enc.js
is minified into lib/enc.min.js. The minified version is used by transcriber.js
by the NSIS script over the command line, and by the NodeJS agent during runtime.
enc.js
can be minified by using minifier.js
, or using Google Closure Compiler directly:
java -jar compiler.jar --language_in=ECMASCRIPT5 --js_output_file=/Users/charitha/git/bridg-pos/revention/posagent/lib/enc.min.js /Users/charitha/git/bridg-pos/revention/posagent/enc.js