From 90849f8eeafb2db47cb5c15531c839dade0cfa2f Mon Sep 17 00:00:00 2001 From: daodao97 Date: Wed, 17 Jun 2020 07:49:45 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=AE=8C=E6=88=90=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guide/install.md | 47 ++++++++++++++++---- docs/index.html | 100 +++++++++++++++++++++--------------------- 2 files changed, 89 insertions(+), 58 deletions(-) diff --git a/docs/guide/install.md b/docs/guide/install.md index 2dd9fe9..8e71258 100644 --- a/docs/guide/install.md +++ b/docs/guide/install.md @@ -1,12 +1,10 @@ -?> `hyperf-admin`目前尚未开源, 敬请期待. - ## 前端 ```shell # 环境依赖 # 1. node ^v11.2.0 https://nodejs.org/zh-cn/download/ # 2. npm ^6.4.1 -git clone https://github.com/hyperf-admin/hyperf-admin-front.git +git clone https://github.com/hyperf-admin/hyperf-admin-frontend.git cd hyperf-admin-front npm i npm run dev @@ -24,16 +22,49 @@ npm run build:test ```shell # 环境依赖 php ^7.1 composer swoole -# 下载demo项目 -git clone https://github.com/hyperf-admin/hyperf-admin-skeleton.git -cd hyperf-admin-skeleton +composer create-project hyperf/hyperf-skeleton hyperf-admin +cd hyperf-admin +# hyperf-admin 为分包的模式, 此处引入的是完整厂库, 实际项目请按需引入 +composer require hyperf-admin/hyperf-admin composer i -# 启动 +# 启动 热重启参考 https://github.com/daodao97/hyperf-watch composer watch ``` ## nginx配置 ```nginx -# conf +upstream backend { + server 127.0.0.1:9511; +} + +server { + listen 80; + server_name hyperf-admin.com; + index index.html; + root /opt/www/rock-admin-front/dist; + access_log /usr/local/var/log/nginx/hyperf-admin.access.log; + error_log /usr/local/var/log/nginx/hyperf-admin.error.log; + + location ~ /api/(.*) { + proxy_http_version 1.1; + proxy_set_header Connection "keep-alive"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host hyperf-admin.com; + proxy_pass http://backend/$1$is_args$args; + } + + location / { + root /opt/www/rock-admin-front/dist/default; + index index.html; + } + + location ~ /(.*) { + set $module $1; + if ($module ~* '^$') { + set $module default; + } + try_files $uri $uri/ /$module/index.html; + } +} ``` diff --git a/docs/index.html b/docs/index.html index 97d7fe8..3dfe635 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,63 +1,63 @@ - - hyperf-admin - - - - - + + hyperf-admin + + + + + -
- - + - - - - - - - + + + + + + + +