0.8.4 • Published 3 years ago

pozoljs v0.8.4

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

Pozol CLI

Pozoljs is a package to initialize your node-express project with typescript or javascript and create full components to develop your backend apps faster.

Pozoljs will helps you to get a node-express project more escalable with a good estructure for folders and files.

Pozoljs is not a framework.

Getting start

Installing the CLI

Global installation.

npm install -g pozoljs
yarn global add pozoljs

Local installation.

npm install pozoljs
yarn add pozoljs

When the package is installed, you will can use pozoljs command.

The CLI :book:

Some concepts

  1. Component is a small folder that contains the principal modules of an endpoint. For example, you will develop endpoints about users, so in the users folder you will have controller, service, routes files (and interface if it is a typescript project).
  2. Service connect with the database or return data that you need. In other words, the service provides data to the controller. In the start, the service file implements find, save, update and delete methods.
  3. Controller manipulate the data that obtains of the service or of the route. The controller call service methods through dependency injection.
  4. Routes about your component like GET, POST, PUT or DELETE.
  5. Interface is using in typescript like a data type.

Build your project using pozoljs

Create a new node-express projects with an initial structure. pozoljs new <name> [options]

Options available

Files Structure

Pozoljs builds a node-express project with an initial structure. This one helps you to develop faster and escalable code. The initial structure is:

├────src
│    ├───api
│    │   └───component
│    │   │    ├───component.controller.ts/js
│    │   │    ├───component.interface.ts
│    │   │    ├───component.routes.ts/js
│    │   │    └───component.service.ts/js
│    │   └───index.ts/js
│    ├───global
│    │   ├───helpers
│    │   │    └───abstract.api-routes.ts
│    │   │    └───abstract.routes.ts
│    │   │    └───abstract.service.ts
│    │   ├───config.ts/js
│    │   ├───interfaces.ts
│    │   └───utils.ts/js
│    │   └───variables.ts/js
│    ├───middlewares
│    ├───database.ts/js
│    ├───index.ts/js
│    └───server.ts/js
├───.editorconfig
├───.env
├───.env.example
├───.gitignore
├───package.json
├───pozoljs.config.json
├───package-lock.json/yarn.lock
└───tsconfig.json

Schematics

All commands have the full type and abreviation type. pozoljs g <schematic> [name]

Schematics availables

About the project created

The project created using pozoljs is to get an initial and generic structure of all your node projects.

In the package.json there are 3 commands:

  1. Run npm run dev/yarn dev to execute the project in development mode.
  2. Run npm run build/yarn build to create the production project (just for typescript).
  3. Run npm run start/yarn start to execute the project in the production mode.

For more information, you can execute: pozoljs --help

0.8.4

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.4

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago