Table of Contents

LiveDB Overview

Tal Updated by Tal

Setting the Environment

Set values in config.json based on your specific database Currently the application supports mssql and mysql databases by setting the databaseType value.

Default configuration is below in case something is accidentally changed or deleted.

{  "databaseType": "mssql",  "databaseHost": "localhost,  "databaseUser": "db_user",  "databasePassword": "db_password",  "databaseName": "db_name",  "databasePort": 1433,  "capacityHost": "value_provided_by_capacity",  "capacitySecret": "value_provided_by_capacity"}

NOTE: The capacityHost and capacitySecret fields are provided by Capacity and should not be changed. These values are required for the server to connect to Capacity's servers.

Starting the server

The command node server.js will automatically start the server listening at port 4201 and start displaying logs. You can override the port by passing a PORT value with the command when running the server. For example: PORT=4400 node server.js

The application will assume it is being started from the directory in which server.js resides. It's important to start the command from the same folder.

Once the server starts, it will attempt to connect with Capacity's server and will send a notification to let you know if the connection was successful or not.

There is a configuration UI available at /configuration that can be accessed via a web browser to assist in creating queries, but manual configuration is also possible. If using the default port, the URL would be http://localhost:4201/configuration


Queries are stored as flat json files, and are located in the queries directory with the following schema:

{  "inputs": [{ "name": "string", "type": "string" }],  "outputs": [{ "name": "string", "type": "string" }]}

Query strings must be defined using @variable_name syntax, and any included variables in a query string must be defined in the inputs array.

For example, if I want to query my users table by name, and return the id and name of the result, my query might look something like:


{  "inputs": [{ "name": "name", "type": "VarChar" }],  "outputs": [    { "name": "id", "type": "Int" },    { "name": "name", "type": "VarChar" }  ],  "query": "select * from users where name = @name"}

Capacity does not have access via the persistent connection to the values stored in the query field or any values placed in the config.json file besides those we provide.

Capacity can get a list of all file names, which are used to send commands, as well as each file's inputs and outputs array.

The server logs each incoming request over the persistent connection as well as the raw data contained in each request and the raw data being returned to Capacity.


1.0 release - 4/30/2020

  • Initial LiveDB Client release
  • Adds support for MySQL and MSSQL databases

How did we do?

Okta Authentification