tachybase_todo/docs/en-US/welcome/getting-started/installation/create-nocobase-app.md
2023-05-25 22:47:05 +08:00

1.7 KiB

create-nocobase-app

0. Prerequisites

Make sure you have:

  • Installed Node.js 16+, Yarn 1.22.x
  • Configured and started one of the required database SQLite 3.x, MySQL 8.x, PostgreSQL 10.x

Please make sure you have Node.js 16.x or above installed. You can download and install the latest LTS version from the official website. It is recommended to use nvm (or nvm-windows for Win systems) to manage Node.js versions if you plan to work with Node.js for a long time.

$ node -v

v16.13.2

Install yarn package manager

$ npm install --global yarn
$ yarn -v

1.22.10

1. Create a NocoBase project

# SQLite
yarn create nocobase-app my-nocobase-app -d sqlite
# MySQL
yarn create nocobase-app my-nocobase-app -d mysql \
   -e DB_HOST=localhost \
   -e DB_PORT=3306 \
   -e DB_DATABASE=nocobase \
   -e DB_USER=nocobase \
   -e DB_PASSWORD=nocobase
# PostgreSQL
yarn create nocobase-app my-nocobase-app -d postgres \
   -e DB_HOST=localhost \
   -e DB_PORT=5432 \
   -e DB_DATABASE=nocobase \
   -e DB_USER=nocobase \
   -e DB_PASSWORD=nocobase

2. Switch to the project directory

cd my-nocobase-app

3. Install dependencies

📢 This next step may take more than ten minutes due to network environment, system configuration, and other factors.

yarn install

4. Install NocoBase

yarn nocobase install --lang=zh-CN

5. Start NocoBase

Development

yarn dev

Production

yarn start

Note: For production, if the code has been modified, you need to execute yarn build and restart NocoBase.

6. Log in to NocoBase

Open http://localhost:13000 in a web browser. The initial account and password are admin@nocobase.com and admin123.