clippingkk-api

command module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

README

clippingkk api Build Status

clippingkk 的后端服务。

db migration

$ curl -L https://github.com/golang-migrate/migrate/releases/download/$version/migrate.$platform-amd64.tar.gz | tar xvz
$ go-db-migrate create -ext sql -dir db/migrations/ FILE_NAME

使用

首先需要修改代码中的 config/config.debug.go.exampleconfig/config.debug.go 填入必要信息

  1. 启动 docker
  2. docker run --rm -it -p 5432:5432 -e POSTGRES_PASSWORD='admin' -e POSTGRES_DB='clippingkk' postgres
  3. docker run --rm -p 6379:6379 redis
  4. go run main.go

访问接口 http://localhost:9654/url/list 即可

生产环境发布

$ make release
$ scp up-clippingkk-api user@host.com
$ ssh xxxxx # 随后拷贝 dcoker-compose 到应用文件夹中,在 api-server 中的 command 命令启动即可

db 测试数据

-- test user
insert into 
users(name, email, pwd, avatar, checked) 
values('AnnatarHe', '1@1.cn', 'bcb15f821479b4d5772bd0ca866c00ad5f926e3580720659cc80d39c9d09802a', 'https://avatars3.githubusercontent.com/u/8704175?v=4&s=460', true);

-- mstester001
INSERT INTO users(name, email, pwd, checked, avatar) VALUES('ms-tester', 'ms-tester@annatarhe.com', '2548423d810efc74aac843eff35e901ee4f7ab40974a3b7d185a2695188fc3ad', true, 'https://avatars3.githubusercontent.com/u/8704175?v=4&s=460');

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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