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