mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 20:13:06 +03:00
39 lines
477 B
Markdown
39 lines
477 B
Markdown
# pgweb
|
|
|
|
Experiments with PostgreSQL and GO
|
|
|
|
## Usage
|
|
|
|
CLI options:
|
|
|
|
```
|
|
-h, --host= Server hostname or IP (localhost)
|
|
-p, --port= Server port (5432)
|
|
-u, --user= Database user (postgres)
|
|
-d, --db= Database name (postgres)
|
|
```
|
|
|
|
## Compile
|
|
|
|
Go 1.3+ is required. To complire source execute:
|
|
|
|
```
|
|
go get
|
|
go build
|
|
```
|
|
|
|
This will produce `pgweb` binary in the current workdir.
|
|
|
|
## API
|
|
|
|
Get database tables:
|
|
|
|
```
|
|
GET /tables
|
|
```
|
|
|
|
Execute select query:
|
|
|
|
```
|
|
POST /query?query=SQL
|
|
``` |