sqliteweb

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2014 License: MIT

README

sqliteweb

sqliteweb is a web-based SQLite database browser. It's written in Go.

It's inspired and influenced by pgweb and sqlite-browser.

Overview

sqliteweb is a web-based SQLite database browser. The goal is to provide a simple and intuitive browser for SQLite databases. It provides basic functions to browse SQLite databases and tables.

Features

  • Browse existing SQLite databases
  • Browse table structure and indexes
  • Browse table data
  • Run custom SQL queries
  • Export query results to CSV and JSON
  • Single executable (just download the executable and run it)
  • Cross-platform

Installation

Use the pre-build relase images from Github Releases.

Currently pre-build releases are available for the following platforms:

  • Mac OSX 64bit
From source

If there are no pre-build images for your platform, you can build sqliteweb from sources.

Requirements:

  • Go
  • Node/NPM
  • $GOPATH must be set

Make sure you have installed Go. Go +1.3 is required. You can install Go with homebrew:

$ brew install go

Get sqliteweb from Github:

$ git clone https://github.com/hypebeast/sqliteweb.git
$ cd sqliteweb

Install required packages to build the frontend:

$ npm install
$ bower install

Build the frontend:

$ gulp dist

Build the server:

$ cd sqliteweb-server
$ make setup
$ make build

Now, run sqliteweb:

$ ./sqliteweb --db ../data/test.db

Usage

Start sqliteweb with the following command:

$ sqliteweb --db path/to/database/name.db

You can also provide a username and password to enable HTTP basic auth:

$ sqliteweb --db=path/to/database/name.db --auth-user=username --auth-pass=validpass

CLI Options

$ sqliteweb -h
Usage:
  sqliteweb [OPTIONS]

Application Options:
  -v, --version    Print version
  -d, --debug      Enable debugging mode (false)
      --db=        SQLite database file
      --bind=      HTTP server host (localhost)
      --listen=    HTTP server listen port (8000)
      --auth-user= HTTP basic auth user
      --auth-pass= HTTP basic auth password
  -s, --skip-open  Skip open sqliteweb in browser on start

Help Options:
  -h, --help       Show this help message

Development

The project consists of two sub-projects:

  • sqliteweb-server: The server part
  • sqliteweb-web: The frontend part
sqliteweb-web

This is the frontend part of sqliteweb. The asset compilation is handled by Gulp.

To install all requirements, run the following commands:

$ cd sqliteweb
$ npm install
$ bower install

There is a built-in webserver for the frontend development. Run the following command to start it:

$ gulp

The compile, watch and copy the frontend files to sqliteweb-server:

$ gulp dev

To generate the dist files and copy them over to sqliteweb-server:

$ gulp dist
sqliteweb-server

The sqliteweb-server provides the API for the frontend.

To build the server:

$ cd sqliteweb/sqliteweb-server
$ make setup
$ make dev
$ ./sqliteweb

Screenshots

Table Structure

Table Content

SQL Query

Contributions

  • Fork repository
  • Create feature- or bugfix-branch
  • Create pull request
  • Use Github Issues

Contact

License

The MIT License (MIT)

Copyright (c) 2014 Sebastian Ruml

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Directories

Path Synopsis
Godeps/_workspace/src/github.com/jessevdk/go-flags
Package flags provides an extensive command line option parser.
Package flags provides an extensive command line option parser.
Godeps/_workspace/src/github.com/jmoiron/sqlx
Package sqlx provides general purpose extensions to database/sql.
Package sqlx provides general purpose extensions to database/sql.
Godeps/_workspace/src/github.com/jmoiron/sqlx/reflectx
Package reflect implements extensions to the standard reflect lib suitable for implementing marshaling and unmarshaling packages.
Package reflect implements extensions to the standard reflect lib suitable for implementing marshaling and unmarshaling packages.
Godeps/_workspace/src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
Package sqlite3 provides interface to SQLite3 databases.
Godeps/_workspace/src/github.com/zenazn/goji
Package goji provides an out-of-box web server with reasonable defaults.
Package goji provides an out-of-box web server with reasonable defaults.
Godeps/_workspace/src/github.com/zenazn/goji/bind
Package bind provides a convenient way to bind to sockets.
Package bind provides a convenient way to bind to sockets.
Godeps/_workspace/src/github.com/zenazn/goji/example
Command example is a sample application built with Goji.
Command example is a sample application built with Goji.
Godeps/_workspace/src/github.com/zenazn/goji/graceful
Package graceful implements graceful shutdown for HTTP servers by closing idle connections after receiving a signal.
Package graceful implements graceful shutdown for HTTP servers by closing idle connections after receiving a signal.
Godeps/_workspace/src/github.com/zenazn/goji/param
Package param deserializes parameter values into a given struct using magical reflection ponies.
Package param deserializes parameter values into a given struct using magical reflection ponies.
Godeps/_workspace/src/github.com/zenazn/goji/web
Package web is a microframework inspired by Sinatra.
Package web is a microframework inspired by Sinatra.
Godeps/_workspace/src/github.com/zenazn/goji/web/middleware
Package middleware provides several standard middleware implementations.
Package middleware provides several standard middleware implementations.
Godeps/_workspace/src/gopkg.in/unrolled/render.v1
Package render is a package that provides functionality for easily rendering JSON, XML, binary data, and HTML templates.
Package render is a package that provides functionality for easily rendering JSON, XML, binary data, and HTML templates.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL