lzhua / sqlpad

Web-based SQL editor run in your own private cloud. Supports MySQL, Postgres, SQL Server, Vertica, Crate, Presto, SAP HANA, and Cassandra

Home Page:http://rickbergfalk.github.io/sqlpad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLPad

Build Status

A web app for writing and running SQL queries and visualizing the results. Supports Postgres, MySQL, SQL Server, Crate, Vertica, Presto, and SAP HANA. Other databases potentially supported via unix odbc support.

SQLPad Query Editor

Docker Image

The docker image runs on port 3000 and uses /var/lib/sqlpad for the embedded database directory.

For configuration exposed via environment variables reference CONFIGURATION.md.

See docker-validation directory for example docker-compose setup with SQL Server.

Building

  • Install node 10 or later

  • Clone/download this repo

  • Install dependencies and build the UI

    scripts/build.sh

    The gist of this script is:

    # install root level dependencies using package-lock.json as reference
    npm ci
    # install front-end dependencies using package-lock.json
    cd client
    npm ci
    # build front-end
    npm run build
    # install back-end dependencies
    cd ../server
    npm ci
    cd ..
    # copy client build to server directory
    mkdir server/public
    cp -r client/build/* server/public

At this point you can run the SQLPad server with the front-end built for production use:

cd server
node server.js --dir ../db --port 3010 --base-url '/sqlpad'

If prefered, SQLPad can be installed as a global module using the local files in this repo. This allows running SQLPad via the cli in any directory, just as if you had installed it with npm install sqlpad -g. Note that you must build and copy the client prior to this step.

cd server
node install -g

# Now from somewhere else you can run sqlpad like
cd ~
sqlpad --dir ../db --port 3010 --base-url '/sqlpad'

A docker image may be built using the Dockerfile located in server directory. See docker-publish.sh for example docker build command.

Configuration

CONFIGURATION.md

Development

Developer guide

License

MIT

About

Web-based SQL editor run in your own private cloud. Supports MySQL, Postgres, SQL Server, Vertica, Crate, Presto, SAP HANA, and Cassandra

http://rickbergfalk.github.io/sqlpad/

License:MIT License


Languages

Language:JavaScript 89.7%Language:CSS 7.6%Language:HTML 1.8%Language:Shell 0.8%Language:Dockerfile 0.1%