fix: api port
This commit is contained in:
parent
9787bedb3c
commit
8196c099cd
@ -66,7 +66,7 @@ Database:
|
||||
安装 & 运行
|
||||
----------
|
||||
|
||||
通过 create-nocobase-app 创建项目
|
||||
通过 `create-nocobase-app` 创建项目
|
||||
|
||||
~~~shell
|
||||
mkdir my-nocobase-app && cd my-nocobase-app
|
||||
@ -74,6 +74,7 @@ yarn create @nocobase/nocobase-app
|
||||
cp .env.example .env
|
||||
docker-compose up -d postgres
|
||||
yarn install
|
||||
yarn nocobase init
|
||||
yarn start
|
||||
~~~
|
||||
|
||||
@ -82,8 +83,8 @@ yarn start
|
||||
~~~shell
|
||||
git clone https://github.com/nocobase/nocobase.git
|
||||
cd nocobase
|
||||
docker-compose up -d postgres # 用 docker 启动数据库
|
||||
cp .env.example .env # 配置数据库信息、APP 端口等
|
||||
docker-compose up -d postgres # 用 docker 启动数据库
|
||||
yarn install
|
||||
yarn run bootstrap
|
||||
yarn run build
|
||||
|
@ -28,7 +28,7 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
networks:
|
||||
- nocobase
|
||||
command: [ "yarn", "start-server", "start", "--port", "8000" ]
|
||||
command: [ "yarn", "nocobase", "start", "--port", "8000" ]
|
||||
working_dir: /app
|
||||
env_file: ./.env
|
||||
volumes:
|
||||
|
@ -13,10 +13,10 @@ import {
|
||||
} from '@nocobase/client';
|
||||
import { extend } from 'umi-request';
|
||||
|
||||
console.log(`${location.protocol}//${location.hostname}:${process.env.API_PORT}/api/`);
|
||||
console.log(`${location.protocol}//${location.hostname}:${location.port}/api/`);
|
||||
|
||||
const request = extend({
|
||||
prefix: `${location.protocol}//${location.hostname}:${process.env.API_PORT}/api/`,
|
||||
prefix: `${location.protocol}//${location.hostname}:${location.port}/api/`,
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user