Wiki
Clone wiki[Nodejs] Backend framework - Generators / Home
Overview
The Generator is a command-line interface tool that helps you to initialize and develop your applications. It helps on many grounds at once, from scaffolding the project to building well-structured apps.
Installation
Install via NPM
npm install -g @wekancompany/generator
Workflow
Once the install is finished, you should be able to invoke CLI commands directly from your command line through the wekan-create
executable.
This provides you with two choices, creating a
- New Project - Requires a project name and a destination folder in which the project will be created. Once complete, the files are generated and the modules are installed
- New Model (along with controllers, services and tests (test files do not actually contain any real tests)) - Requires a model name (use a singular PascalCased noun) and a project location into which the files will be generated. Once the model and related files are generated, to activate the endpoints, register the route by adding the newly generated controller to the controllers array in
src/app/app.ts
Updated