Getting Started
Prerequisites
Manual Installation
This chapter will help you build a simple Zerone base service from scratch.
- Step 1: Install Zerone CLI tool and create a new project
npm i -g @zeronejs/cli
zerone new project-name
cd project-name
- Step 2: Install the dependencies and run them
yarn
yarn start
npm install
npm run start
Zerone launches a development server athttp://localhost:5000. http://localhost:5000/docs started a Swagger open API.
You should now have a simple working Zerone server.
Generate CURD by one key
After the project is created, it carries a user entity, and this section will help you generate the interface with one click.
TIP
The generate command reads the table structure of all *.entity.ts files in the current directory
You need to enter this folder
cd src/api/user/entities/
With a single command, a CRUD is generated。
zerone generate
Restart the project
yarn start
npm run start
View the generated interface on http://localhost:5000/docs
TIP
This project is built on TypeOrm. For personalized requirements such as table association, please refer to typeorm
Backstage
Open the http://localhost:5000/adminto view the backstage data.
TIP
Click login directly. Configuration file in src/common/admin/adminOption.ts


