docs: update readme
This commit is contained in:
parent
968fd2e656
commit
4a1c381a24
85
README.md
85
README.md
@ -55,86 +55,35 @@ Requirements
|
|||||||
|
|
||||||
Node:
|
Node:
|
||||||
|
|
||||||
- Node.js 12.x or 14.x
|
- Node.js 12.20+
|
||||||
|
|
||||||
Database(Choose any one):
|
Database:
|
||||||
|
|
||||||
- PostgreSQL 10.x+ (Recommend)
|
- PostgreSQL 10.x+
|
||||||
- MySQL 5.7.x+
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Use only as a no-code platform
|
Create a project with `create-nocobase-app`
|
||||||
|
|
||||||
~~~bash
|
|
||||||
# Create project directory
|
|
||||||
mkdir my-nocobase-project && cd my-nocobase-project
|
|
||||||
# npm initialization
|
|
||||||
npm init
|
|
||||||
# Installing nocobase dependencies
|
|
||||||
npm i @nocobase/api @nocobase/app
|
|
||||||
# Copy and configure env, don't forget to change the database information
|
|
||||||
cp -r node_modules/@nocobase/api/.env.example .env
|
|
||||||
# Database initialization
|
|
||||||
npx nocobase db-init
|
|
||||||
# Start app
|
|
||||||
npx nocobase start
|
|
||||||
~~~
|
|
||||||
|
|
||||||
Want to participate in the development
|
|
||||||
|
|
||||||
~~~shell
|
~~~shell
|
||||||
# You can use docker to start the database
|
mkdir my-nocobase-app && cd my-nocobase-app
|
||||||
docker-compose up -d postgres
|
yarn create nocobase-app
|
||||||
# Set Environment Variables
|
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
npm install
|
docker-compose up -d postgres
|
||||||
npm run bootstrap
|
yarn install
|
||||||
npm run build
|
yarn start
|
||||||
npm run db-migrate init
|
|
||||||
npm start
|
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Nodejs provided by docker
|
Participate in the development
|
||||||
|
|
||||||
```shell
|
~~~shell
|
||||||
git clone https://github.com/nocobase/nocobase.git
|
git clone https://github.com/nocobase/nocobase.git
|
||||||
cd nocobase
|
cd nocobase
|
||||||
# You can use docker to start the database
|
docker-compose up -d postgres # 用 docker 启动数据库
|
||||||
docker-compose up -d postgres
|
cp .env.example .env # 配置数据库信息、APP 端口等
|
||||||
# Set Environment Variables
|
yarn install
|
||||||
cp .env.example .env
|
yarn run bootstrap
|
||||||
|
yarn run build
|
||||||
# Installing dependencies and initializing
|
yarn start
|
||||||
docker-compose run nocobase bash -c 'npm install && npm run bootstrap && npm run build && npm run db-migrate init'
|
|
||||||
|
|
||||||
# Start nocobase
|
|
||||||
docker-compose up -d nocobase
|
|
||||||
|
|
||||||
# View log
|
|
||||||
docker-compose logs nocobase
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
Build
|
|
||||||
----------
|
|
||||||
|
|
||||||
~~~shell
|
|
||||||
# for all packages
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
# for specific package
|
|
||||||
npm run build <package_name_1> <package_name_2> ...
|
|
||||||
~~~
|
|
||||||
|
|
||||||
Test
|
|
||||||
----------
|
|
||||||
|
|
||||||
~~~
|
|
||||||
# For all packages
|
|
||||||
npm test
|
|
||||||
|
|
||||||
# For specific package
|
|
||||||
npm test packages/<name>
|
|
||||||
~~~
|
~~~
|
||||||
|
@ -57,83 +57,35 @@ NocoBase 架构
|
|||||||
|
|
||||||
Node:
|
Node:
|
||||||
|
|
||||||
- Node.js 12.x or 14.x
|
- Node.js 12.20+
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
- PostgreSQL 10.x+
|
- PostgreSQL 10.x+
|
||||||
- MySQL 5.7.x+
|
|
||||||
|
|
||||||
安装 & 运行
|
安装 & 运行
|
||||||
----------
|
----------
|
||||||
|
|
||||||
仅作为无代码平台使用
|
通过 create-nocobase-app 创建项目
|
||||||
|
|
||||||
~~~shell
|
~~~shell
|
||||||
# 创建项目目录
|
mkdir my-nocobase-app && cd my-nocobase-app
|
||||||
mkdir my-nocobase-project && cd my-nocobase-project
|
yarn create @nocobase/nocobase-app
|
||||||
# 初始化 npm
|
cp .env.example .env
|
||||||
npm init
|
docker-compose up -d postgres
|
||||||
# 安装 nocobase 包
|
yarn install
|
||||||
npm i @nocobase/api @nocobase/app
|
yarn start
|
||||||
# 复制并配置 env,不要忘了修改数据库信息
|
|
||||||
cp -r node_modules/@nocobase/api/.env.example .env
|
|
||||||
# 数据库初始化
|
|
||||||
npx nocobase db-init
|
|
||||||
# 启动应用
|
|
||||||
npx nocobase 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 启动数据库
|
docker-compose up -d postgres # 用 docker 启动数据库
|
||||||
cp .env.example .env # 配置数据库信息、APP 端口等
|
cp .env.example .env # 配置数据库信息、APP 端口等
|
||||||
npm install
|
yarn install
|
||||||
npm run bootstrap
|
yarn run bootstrap
|
||||||
npm run build
|
yarn run build
|
||||||
npm run db-migrate init
|
yarn start
|
||||||
npm start
|
|
||||||
~~~
|
|
||||||
|
|
||||||
如果本地 node 有问题,可以使用 docker 提供的环境
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git clone https://github.com/nocobase/nocobase.git
|
|
||||||
cd nocobase
|
|
||||||
docker-compose up -d postgres # 用 docker 启动数据库
|
|
||||||
cp .env.example .env # 配置数据库信息、APP 端口等
|
|
||||||
|
|
||||||
# 使用 docker 提供的 node 环境安装依赖与初始化
|
|
||||||
docker-compose run nocobase bash -c 'npm install && npm run bootstrap && npm run build && npm run db-migrate init'
|
|
||||||
|
|
||||||
# 启动 nocobase 应用
|
|
||||||
docker-compose up -d nocobase
|
|
||||||
|
|
||||||
# 查看日志
|
|
||||||
docker-compose logs nocobase
|
|
||||||
```
|
|
||||||
|
|
||||||
打包
|
|
||||||
----------
|
|
||||||
|
|
||||||
~~~shell
|
|
||||||
# for all packages
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
# for specific package
|
|
||||||
npm run build <package_name_1> <package_name_2> ...
|
|
||||||
~~~
|
|
||||||
|
|
||||||
测试
|
|
||||||
----------
|
|
||||||
|
|
||||||
~~~
|
|
||||||
# For all packages
|
|
||||||
npm test
|
|
||||||
|
|
||||||
# For specific package
|
|
||||||
npm test packages/<name>
|
|
||||||
~~~
|
~~~
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@nocobase/create-nocobase-app",
|
"name": "create-nocobase-app",
|
||||||
"version": "0.5.0-alpha.9",
|
"version": "0.5.0-alpha.9",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
Loading…
Reference in New Issue
Block a user