Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2864ba9
fix auth/login
Oct 31, 2017
adb556b
fix login
yalishizhude Nov 1, 2017
e2980b7
fix navbar
Nov 1, 2017
efee590
fix project
yalishizhude Nov 2, 2017
a704aa3
add refresh
Nov 2, 2017
f16bfbe
modify api page
yalishizhude Nov 3, 2017
84c436a
fix api page
Nov 5, 2017
9f9558b
fix api bug
yalishizhude Nov 6, 2017
12e0a4f
update api
Nov 6, 2017
dd85874
add json schema
yalishizhude Nov 7, 2017
8dbf7f9
list2schema
Nov 7, 2017
2886b83
schema2list to be done
Nov 7, 2017
0195ec6
before param-editor
yalishizhude Nov 8, 2017
7c0d92f
component param-editor
yalishizhude Nov 8, 2017
213fe9c
json2schmea to be done
Nov 8, 2017
83b94c6
api optimize && api exist
yalishizhude Nov 9, 2017
6a4541f
modify css
Nov 9, 2017
9721194
modify css
Nov 9, 2017
149eef4
import json list-object bug && json clean
yalishizhude Nov 10, 2017
581cf18
update api component
yalishizhude Nov 14, 2017
9fcef00
add deploy
yalishizhude Nov 16, 2017
2dca284
modify deploy
yalishizhude Nov 16, 2017
b30656f
add docker-compose
yalishizhude Nov 17, 2017
563c0bf
modify css
yalishizhude Nov 17, 2017
76559a2
:bug: fix export && setting
Nov 19, 2017
f2c10c0
:bug: fix message bug
yalishizhude Nov 20, 2017
5834928
:bug: fix number integer
yalishizhude Nov 20, 2017
aa11646
async component && message bug fix :bug:
yalishizhude Dec 6, 2017
0d3fa59
api optimize
yalishizhude Dec 7, 2017
cb4e514
optimize schema validate
yalishizhude Dec 8, 2017
3c404e7
:bug: fix api index
yalishizhude Dec 11, 2017
b66213e
:bug: optimize performance&fix shcema property
yalishizhude Dec 13, 2017
27becef
handle tulpe array items
yalishizhude Dec 13, 2017
75a51f9
add copy
yalishizhude Dec 14, 2017
20a53a4
add debug
yalishizhude Dec 22, 2017
54dd404
add feature:debug
yalishizhude Dec 23, 2017
e0f5adf
add deploy
yalishizhude Dec 28, 2017
1237b21
optimize parameter editor
yalishizhude Mar 10, 2018
3227b7c
modify docker-compose & api edit style
yalishizhude Jul 3, 2018
207bd64
docker-compose
yalishizhude Jul 3, 2018
5d9c437
import2module && module deletable
yalishizhude Jul 4, 2018
601720c
add validation error message
yalishizhude Jul 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package-lock.json
npm-debug.log
node_modules/
dist/
.nyc_output/
coverage/
coverage/
server/static/
server/upload/
server/report/
server/yarn-error.log
.vscode/
data/
39 changes: 39 additions & 0 deletions docker-compose-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 离线构建版本,减少pull镜像时间
version: "2"
services:
web:
build:
context: ./web
dockerfile: Dockerfile
container_name: api-web
working_dir: /etc/nginx/
tty: true
stdin_open: true
restart: always
ports:
- 2017:2017
depends_on:
- server
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: api-server
working_dir: /app
tty: true
stdin_open: true
restart: always
ports:
- 2018:2018
depends_on:
- db
db:
image: mongo:3
container_name: api-db
tty: true
stdin_open: true
restart: always
volumes:
- ./data:/data
ports:
- 27001:27017
45 changes: 45 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 开发环境
version: "2"
services:
api-web-dev:
build:
context: ./web
dockerfile: Dockerfile4dev
image: bestapi_web:dev
container_name: api-web-dev
working_dir: /app
tty: true
stdin_open: true
environment:
SERVER_HOST: api-server-dev
volumes:
- ./web:/app
ports:
- 20170:2017
depends_on:
- api-server-dev
api-server-dev:
build:
context: ./server
dockerfile: Dockerfile4dev
image: bestapi_server:dev
container_name: api-server-dev
working_dir: /app
tty: true
stdin_open: true
volumes:
- ./server:/app
ports:
- 20180:2018
- 8102:5858
depends_on:
- api-db-dev
api-db-dev:
image: mongo:3
container_name: api-db-dev
volumes:
- api_db_data:/data
ports:
- 27000:27017
volumes:
api_db_data:
49 changes: 19 additions & 30 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
version: "3"
# 生产环境
version: "2"
services:
web:
build:
context: ./web
api-web:
image: yalishizhude/bestapi-web
container_name: api-web
working_dir: /app
tty: true
stdin_open: true
volumes:
- api_web_modules:/app/node_modules
- ./web:/app
ports:
- 2017:2017
command: npm run compose
server:
build:
context: ./server
restart: always
network_mode: host
depends_on:
- api-server
api-server:
image: yalishizhude/bestapi-server
container_name: api-server
working_dir: /app
tty: true
stdin_open: true
volumes:
- api_server_modules:/app/node_modules
- ./server:/app
ports:
- 2018:2018
- 8102:5858
command: npm run compose
restart: always
network_mode: host
depends_on:
- db
db:
image: mongo:latest
- api-db
api-db:
image: mongo:3
container_name: api-db
ports:
- 27018:27017
volumes:
api_web_modules:
api_server_modules:
restart: always
network_mode: host
volumes:
- ./data:/data
6 changes: 0 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# 功能点
* API模板。可以通过模板来创建新的API
* 导出模板。可以通过html模板导出成想要文档
* 开放API。支持调用接口访问API信息
* API参数增加枚举类型。
* API版本信息可编辑

#
### element-ui官方未提供 d.ts模块声明文件,若在src里添加vue-shimes.d.ts,会造成karma测试不通过,暂时手动在node_module/element-ui/下,添加index.d.ts文件
9 changes: 6 additions & 3 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# api-server
FROM node:7-alpine
FROM node:8
RUN mkdir /app
RUN chmod 777 /app
WORKDIR /app
VOLUME ["/app"]
EXPOSE 2018

COPY ./Hongkong /etc/localtime
RUN npm set registry https://registry.npm.taobao.org
RUN npm i -g pm2 nodemon typescript
RUN yarn global add pm2
COPY ./template /app/template
COPY ./node_modules /app/node_modules
COPY ./dist /app
ENTRYPOINT pm2-docker start ./app.js
12 changes: 12 additions & 0 deletions server/Dockerfile4dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# api-server
FROM node:8
RUN mkdir /app
RUN chmod 777 /app
WORKDIR /app
VOLUME ["/app"]
EXPOSE 2018
ENV DB_HOST=api-db-dev
COPY ./Hongkong /etc/localtime
RUN npm set registry https://registry.npm.taobao.org
RUN yarn global add nodemon typescript@2.4
RUN echo "请执行 npm run init 安装依赖"
13 changes: 13 additions & 0 deletions server/_Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# api-server
FROM node:8
RUN mkdir /app
RUN chmod 777 /app
WORKDIR /app
EXPOSE 2018

COPY ./Hongkong /etc/localtime
RUN npm set registry https://registry.npm.taobao.org
RUN npm i -g pm2
ENV DB_HOST=api-db
COPY ./ /app
ENTRYPOINT pm2 start --name api-server ./dist/app.js && bash
Loading