An open API service indexing awesome lists of open source software.

https://github.com/ravenq/gvf-server

The server for the GVF project.
https://github.com/ravenq/gvf-server

beego go gvf server web

Last synced: 11 months ago
JSON representation

The server for the GVF project.

Awesome Lists containing this project

README

          

# gvf-server

[![Build Status](https://travis-ci.org/ravenq/gvf-server.svg?branch=master)](https://travis-ci.org/ravenq/gvf-server)

> The server for the GVF project.

## database

install mysql, and create a database named 'myblog'.

```sh
mysql> create database myblog;
```

## dev

install bee.

```sh
go get github.com/beego/bee
```

set env on windows.

```sh
set QINIU_AK
set QINIU_SK
set QINIU_BUCKET
set ADMIN_NAME
set ADMIN_NICK
set ADMIN_PASSWORD
set ADMIN_EMAIL
```

and you can add it in you system environment variables.

set env on linux.

```sh
export QINIU_AK=
export QINIU_SK=
export QINIU_BUCKET=
export ADMIN_NAME=
export ADMIN_NICK=
export ADMIN_PASSWORD=
export ADMIN_EMAIL=
```

and you can add it in ~/.bash_profile

run

```sh
bee run
```

debug in vscode.config you launch.json.

```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"env": {},
"args": []
}
]
}
```

## docker

### build the image

```sh
docker build -t ravenq/gvf-server .
```

or pull the image from DockerHub.

```sh
docker pull ravenq/gvf-server
```

### run with docker-compose

modify the docker-compose.yml for you config:

```sh
QINIU_AK:
QINIU_SK:
QINIU_BUCKET:
ADMIN_NAME:
ADMIN_NICK:
ADMIN_PASSWORD:
ADMIN_EMAIL:
```

and then run.

```sh
docker-compose up -d
```