0.0.7 • Published 6 years ago

jdbcsql_web_client v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

jdbcsql_web_client

Build StatusCoverage Status

Web server and client to execute sql queries via node-jdbc

node-jdbc connects a JVM to node, allowing to load an arbitrary JDBC SQL Driver.

Driver and Classpath can be configured via a jdbcsql_config.json file in the root folder. A default example is supplied. Sample drivers for derby (including a derby db for testing is supplied as part of the repo (but not the npm dist!))

Built commandline

    npm install
    gulp

prerequisites: the dependency node-jdbc require java and jdk (javac) on your path

Run server:

    node server.js
    node server.js --simul

Simulates a database (no jdbc driver and running db requried)

    node server.js -f

Creates a fake system view table on any DB and uses this to emulate a monitoring view

Usage

For plain usage without forking and tampering, it is sufficient to create an independent project (npm init), include this as a dependency npm i jdbcsql_web_client --save-dev and create a small main.js:

var server = require('jdbcsql_web_client');

put a config next to main and run via

node main.js --help

example screenshot

alt example screenshot

Development

The src folder contains both typescript and js files.

All files are compiled to gen (using tsc/babel)

tap for testing and coverage

Currently the test folder is not compiled, but contains directly es6 modules

gulp, gulp-watch should work