Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bakaoh/sqlite-gobroem
Golang Sqlite Browser Embedded
https://github.com/bakaoh/sqlite-gobroem
browser embedded golang sqlite
Last synced: about 1 month ago
JSON representation
Golang Sqlite Browser Embedded
- Host: GitHub
- URL: https://github.com/bakaoh/sqlite-gobroem
- Owner: bakaoh
- License: mit
- Created: 2018-09-20T04:04:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T04:38:41.000Z (about 6 years ago)
- Last Synced: 2024-06-20T03:29:18.560Z (6 months ago)
- Topics: browser, embedded, golang, sqlite
- Language: JavaScript
- Size: 1.71 MB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlite-gobroem
`sqlite-gobroem` is a Golang embedded web-based SQLite database browser.
## Installing
Use go get to install the latest version of the library:
```bash
$ go get -u github.com/bakaoh/sqlite-gobroem
```Include Gobroem in your application:
```go
import "github.com/bakaoh/sqlite-gobroem/gobroem"
```## Standalone
Use go build to build Gobroem:
```bash
$ cd $GOPATH/src/github.com/bakaoh/sqlite-gobroem/gobroem
$ go build .
```Run Gobroem:
```bash
$ ./sqlite-gobroem -hUsage of ./sqlite-gobroem:
-bind string
HTTP server host (default "localhost")
-db string
SQLite database file (default "test/test.db")
-listen uint
HTTP server listen port (default 8000)$ ./sqlite-gobroem
```Open browser http://localhost:8000/
## Embedded
Initialize the API controller:
```go
api, err := gobroem.NewAPI("path to sqlite db file")
if err != nil {
log.Fatal("can not open db", err)
}
```Register the API handler:
```go
http.Handle("/browser/", api.Handler("/browser/"))
```