Skip to content

Usage

Create a new application

Create a standard or traditional application

Terminal window
zanobijs new <app_name> [options]
## with alias
zanobijs n <app_name> [options]

By performing this command, create a folder with the name of the application and create all the files necessary for its operation

Arguments

ArgumentDescription
<app_name>Application name

options

OptionDescription
--AWSlambdaCreate an application with a framework for an AWS lambda

Generate entities

Generate the entities to be used in the application

Terminal window
zanobijs generate <entity> [name] <provider_value>
## with alias
zanobijs g <entity> [name] <provider_value>

Running this command generates a file based on the entity and the specified path

Arguments

ArgumentDescription
entityEntity to generate
nameEntity name
provider_valueValue to be given to a provider

Entities

EntitiesaliasExample command
controllerc
Terminal window
zanobijs g c src/controller/myController
services
Terminal window
zanobijs g s src/service/myService
providerp
Terminal window
zanobijs g p src/service/PROVIDER_EXAMPLE '3'
modulem
Terminal window
zanobijs g m src/functionality/myModule

Build an application

Generates a zip of the application ready for distribution with default configuration.

Terminal window
zanobijs build

App build customization

Different configuration can be done by adding in the package.json of the application the following property:

...
"zanobiJSBuildConfig": {
"buildName": "salida/output/MiAppNode.zip",
"files": [
{
"source": "package.json",
"destination": "packageZNB.json"
}
],
"folders": [
{
"source": "dist",
"destination": "code"
},
{
"source": "node_modules",
"destination": "nodeModules"
}
]
}
...
PropertyDescription
buildNameName of the zip for the distribution
filesFiles to add
foldersFolders to add

Support us

ZanobiJS is an open source project licensed by MIT. It can grow thanks to the support of amazing people like you. If you want to join, read more here.