GoHighlights
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/icbd/gohighlights)
This is GoHighlights's server project, the frontend project is https://github.com/icbd/gohighlights_ext .
Features
- Add Highlight
- Change Color
- Remove Highlight
- Replay Highlight
![](https://github.com/icbd/gohighlights_ext/raw/master/demo.png)
Config
ENV
ENV Tag |
Description |
Default |
GIN_MODE |
gin mode (debug/test/release) |
debug |
DB_TYPE |
database type (mysql/sqlite) |
sqlite |
DB_DSN |
database data source name |
root:password@tcp(127.0.0.1:3306)/dbname |
CONF_LOC |
config file location |
./config.yaml |
ES_URL |
elasticsearch url |
http://localhost:9200 |
CMD
- Edit Config File
vi config.yaml
If you are using MySQL, please create the database manually.
- Migration
GIN_MODE=debug go run ./bin/migrate_cmd.go -db=migrate
Also see https://github.com/icbd/gorm-migration .
- Run Server
GIN_MODE=debug go run ./main.go
Run test
including sub-packages
GIN_MODE=test go run ./bin/migrate_cmd.go -db=migrate
GIN_MODE=test go test ./... -v
License
MIT, see LICENSE