Skip to content

Latest commit

 

History

History
137 lines (113 loc) · 2.5 KB

README.md

File metadata and controls

137 lines (113 loc) · 2.5 KB

What's Poundcake?

A NodeJS application generator to scaffold new projects.

Installation

npm i -g node-poundcake

Usage

To generate a default app:

node-poundcake -n <dirname>
📦<dirname>
 ┣ 📂__tests__
 ┣ 📂src
 ┃ ┗ 📜index.js
 ┣ 📜.dockerignore
 ┣ 📜.editorconfig
 ┣ 📜.eslintrc
 ┣ 📜Dockerfile
 ┣ 📜README.md
 ┗ 📜package.json

To generate a API:

node-poundcake -n <dirname> --api
📦<dirname>
 ┣ 📂__tests__
 ┣ 📂src
 ┃ ┣ 📂app
 ┃ ┃ ┣ 📜router.js
 ┃ ┃ ┗ 📜server.js
 ┃ ┣ 📂controllers
 ┃ ┃ ┣ 📜index.js
 ┃ ┃ ┗ 📜main-controller.js
 ┃ ┗ 📜index.js
 ┣ 📜.dockerignore
 ┣ 📜.editorconfig
 ┣ 📜.eslintrc
 ┣ 📜Dockerfile
 ┣ 📜README.md
 ┗ 📜package.json

To generate a Typescript project (all options have TS support):

node-poundcake -n <dirname> --ts
📦<dirname>
 ┣ 📂__tests__
 ┣ 📂src
 ┃ ┣ 📂app
 ┃ ┃ ┣ 📜router.ts
 ┃ ┃ ┗ 📜server.ts
 ┃ ┣ 📂controllers
 ┃ ┃ ┣ 📜index.ts
 ┃ ┃ ┗ 📜main-controller.ts
 ┃ ┗ 📜index.ts
 ┣ 📜.dockerignore
 ┣ 📜.editorconfig
 ┣ 📜.eslintrc
 ┣ 📜Dockerfile
 ┣ 📜package.json
 ┗ 📜tsconfig.json

To generate a API with Mongo and RabbitMQ:

node-poundcake -n <dirname> --api --mongo --rabbitmq
📦<dirname>
 ┣ 📂__tests__
 ┣ 📂src
 ┃ ┣ 📂app
 ┃ ┃ ┣ 📜router.js
 ┃ ┃ ┗ 📜server.js
 ┃ ┣ 📂controllers
 ┃ ┃ ┣ 📜index.js
 ┃ ┃ ┗ 📜main-controller.js
 ┃ ┣ 📂models
 ┃ ┃ ┗ 📜contact.js
 ┃ ┣ 📂services
 ┃ ┃ ┣ 📜index.js
 ┃ ┃ ┣ 📜mongo.js
 ┃ ┃ ┗ 📜rabbitmq.js
 ┃ ┣ 📂subscribers
 ┃ ┗ 📜index.js
 ┣ 📜.dockerignore
 ┣ 📜.editorconfig
 ┣ 📜.eslintrc
 ┣ 📜Dockerfile
 ┣ 📜README.md
 ┗ 📜package.json

All dependencies will be added on package.json according to the options.

Command Line Options

# node-poundcake --help
-n, --name <dir>  project directory name
--ts              typescript mode
--api             add express api
--mongo           add mongoose service
--rabbitmq        add amqplib service
--swagger         add swagger doc
-f, --force       remove directory if exists
-h, --help        display help for command

License

MIT

E.V.H.

The name of the application is a tribute to EVH (1955 - 2020). Thanks for everything Eddie.