2014-10-09 06:29:43 +04:00
|
|
|
# pgweb
|
|
|
|
|
2014-10-11 06:06:08 +04:00
|
|
|
Web-based PostgreSQL database browser written in Go.
|
2014-10-09 06:29:43 +04:00
|
|
|
|
2015-05-19 00:28:05 +03:00
|
|
|
[![Release](https://img.shields.io/github/release/sosedoff/pgweb.svg?label=Release)](https://github.com/sosedoff/pgweb/releases)
|
2015-05-10 06:12:38 +03:00
|
|
|
[![Linux Build](https://img.shields.io/travis/sosedoff/pgweb.svg?label=Linux)](https://travis-ci.org/sosedoff/pgweb)
|
|
|
|
[![Windows Build](https://img.shields.io/appveyor/ci/sosedoff/pgweb/master.svg?label=Windows)](https://ci.appveyor.com/project/sosedoff/pgweb)
|
2014-10-28 06:12:56 +03:00
|
|
|
|
2014-10-14 06:02:04 +04:00
|
|
|
## Overview
|
|
|
|
|
2014-12-30 05:03:35 +03:00
|
|
|
Pgweb is a web-based database browser for PostgreSQL, written in Go and works
|
|
|
|
on OSX, Linux and Windows machines. Main idea behind using Go for backend development
|
|
|
|
is to utilize ability of the compiler to produce zero-dependency binaries for
|
|
|
|
multiple platforms. Pgweb was created as an attempt to build very simple and portable
|
|
|
|
application to work with local or remote PostgreSQL databases.
|
2014-10-14 06:02:04 +04:00
|
|
|
|
2015-06-04 04:33:01 +03:00
|
|
|
[See application screenshots](SCREENS.md)
|
2014-10-14 20:34:22 +04:00
|
|
|
|
2014-12-30 05:03:35 +03:00
|
|
|
## Features
|
2014-10-23 19:11:40 +04:00
|
|
|
|
2016-01-22 05:01:53 +03:00
|
|
|
- Cross-platform support OSX/Linux/Windows 32/64-bit
|
|
|
|
- Simple installation (distributed as a single binary)
|
2014-12-30 05:03:35 +03:00
|
|
|
- Zero dependencies
|
2016-01-22 05:01:53 +03:00
|
|
|
- Works with PostgreSQL 9.1+
|
|
|
|
- SSH Connections
|
2016-01-11 00:41:07 +03:00
|
|
|
- Multiple database sessions
|
2016-01-22 05:01:53 +03:00
|
|
|
- Simple database browser
|
|
|
|
- Execute and analyze custom SQL queries
|
|
|
|
- Table and query data export to CSV/JSON/XML
|
2014-12-30 05:03:35 +03:00
|
|
|
- Query history
|
|
|
|
- Server bookmarks
|
2014-10-23 19:11:40 +04:00
|
|
|
|
2014-12-30 05:03:35 +03:00
|
|
|
Visit [WIKI](https://github.com/sosedoff/pgweb/wiki) for more details
|
2014-10-17 02:42:40 +04:00
|
|
|
|
2016-01-11 00:41:07 +03:00
|
|
|
## Demo
|
|
|
|
|
|
|
|
Visit https://pgweb-demo.herokuapp.com to see pgweb in action.
|
|
|
|
|
2014-12-11 08:41:45 +03:00
|
|
|
## Installation
|
2014-10-29 21:58:32 +03:00
|
|
|
|
2014-12-11 08:42:24 +03:00
|
|
|
[Precompiled binaries](https://github.com/sosedoff/pgweb/releases) for supported
|
2014-12-11 08:41:45 +03:00
|
|
|
operating systems are available.
|
2014-10-29 21:58:32 +03:00
|
|
|
|
2014-12-30 05:03:35 +03:00
|
|
|
[More installation options](https://github.com/sosedoff/pgweb/wiki/Installation)
|
2014-12-11 08:43:17 +03:00
|
|
|
|
2014-10-09 06:29:43 +04:00
|
|
|
## Usage
|
|
|
|
|
2014-10-14 06:03:42 +04:00
|
|
|
Start server:
|
|
|
|
|
2014-11-08 03:12:08 +03:00
|
|
|
```
|
|
|
|
pgweb
|
|
|
|
```
|
|
|
|
|
|
|
|
You can also provide connection flags:
|
|
|
|
|
2014-10-14 06:03:42 +04:00
|
|
|
```
|
2014-10-14 19:52:40 +04:00
|
|
|
pgweb --host localhost --user myuser --db mydb
|
2014-10-14 06:03:42 +04:00
|
|
|
```
|
|
|
|
|
2014-11-08 03:12:08 +03:00
|
|
|
Connection URL scheme is also supported:
|
2014-10-14 06:02:04 +04:00
|
|
|
|
|
|
|
```
|
2014-11-08 03:12:08 +03:00
|
|
|
pgweb --url postgres://user:password@host:port/database?sslmode=[mode]
|
2014-10-14 06:02:04 +04:00
|
|
|
```
|
|
|
|
|
2016-01-11 00:41:07 +03:00
|
|
|
### Multiple database sessions
|
|
|
|
|
|
|
|
To enable multiple database sessions in pgweb, start the server with:
|
|
|
|
|
|
|
|
```
|
|
|
|
pgweb --sessions
|
|
|
|
```
|
|
|
|
|
|
|
|
Or set environment variable:
|
|
|
|
|
|
|
|
```
|
|
|
|
SESSIONS=1 pgweb
|
|
|
|
```
|
|
|
|
|
2014-12-11 08:41:45 +03:00
|
|
|
## Deploy on Heroku
|
2014-12-05 08:35:25 +03:00
|
|
|
|
2016-01-22 05:01:53 +03:00
|
|
|
[![Heroku Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/sosedoff/pgweb)
|
2014-11-08 03:12:08 +03:00
|
|
|
|
2015-01-02 23:27:51 +03:00
|
|
|
## Testing
|
|
|
|
|
2015-06-04 04:43:22 +03:00
|
|
|
Before running tests, make sure you have PostgreSQL server running on `localhost:5432`
|
|
|
|
interface. Also, you must have `postgres` user that could create new databases
|
|
|
|
in your local environment. Pgweb server should not be running at the same time.
|
|
|
|
|
|
|
|
Execute test suite:
|
2015-01-02 23:27:51 +03:00
|
|
|
|
|
|
|
```
|
|
|
|
make test
|
|
|
|
```
|
|
|
|
|
2016-01-22 05:01:53 +03:00
|
|
|
If you're using Docker locally, you might also run pgweb test suite against
|
|
|
|
all supported PostgreSQL version with a single command:
|
|
|
|
|
|
|
|
```
|
|
|
|
make test-all
|
|
|
|
```
|
|
|
|
|
2014-12-30 05:03:35 +03:00
|
|
|
## Contribute
|
2014-11-08 03:12:08 +03:00
|
|
|
|
2015-06-04 04:43:22 +03:00
|
|
|
- Fork this repository
|
|
|
|
- Create a new feature branch for a new functionality or bugfix
|
|
|
|
- Commit your changes
|
|
|
|
- Execute test suite
|
|
|
|
- Push your code and open a new pull request
|
|
|
|
- Use [issues](https://github.com/sosedoff/pgweb/issues) for any questions
|
|
|
|
- Check [wiki](https://github.com/sosedoff/pgweb/wiki) for extra documentation
|
2014-11-03 09:35:56 +03:00
|
|
|
|
2014-11-08 03:12:08 +03:00
|
|
|
## Contact
|
2014-10-14 06:02:04 +04:00
|
|
|
|
2014-11-08 03:12:08 +03:00
|
|
|
- Dan Sosedoff
|
|
|
|
- [dan.sosedoff@gmail.com](mailto:dan.sosedoff@gmail.com)
|
|
|
|
- [http://twitter.com/sosedoff](http://twitter.com/sosedoff)
|
2014-10-14 06:02:04 +04:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
The MIT License (MIT)
|
|
|
|
|
2016-01-05 09:41:50 +03:00
|
|
|
Copyright (c) 2014-2016 Dan Sosedoff, <dan.sosedoff@gmail.com>
|