1.1.0 • Published 2 years ago

@baronote/init v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@baronote/init

logger

Description

node express 프로젝트를 생성하는 명령어 입니다.

다양한 옵션을 통해 프로젝트를 구성할 수 있으며 기본 옵션은 다음과 같습니다.

Installation

$ npm i -g @baronote/init
$ npm i --save @baronote/init 

$ baro init --help

Usage: baro init <projectName> -d [database] -ss [sessionStore] -v [version] -t -i -rc

각종 옵션을 포함해 프로젝트를 구성하는 명령어

Arguments:
  projectName                   프로젝트 명칭 (default: "baroInit")

Options:
  -d, --database <string>       연동 하려는 데이터 베이스 종류
                                ex : mysql, mariadb, oracle, mongo
  -ss, --sessionStore <string>  사용하려는 세션 스토어
                                ex : memoryStore, redisClient
  -rc, --redisClient            redisClient 클래스 포함, 세션 스토어와 함께 사용시 우선시 됩니다. (default: false)
  -v, --version <string>        프로젝트 버전 설정 (default: "1.0.0")
  -t, --tree                    프로젝트 생성과 트리 구조를 표시 (default: false)
  -i, --install                 프로젝트 생성 후 npm install 수행 (default: false)
  -h, --help                    display help for command

Example

In Linux

$ baro init example -d mysql -ss redisClient -v 1.1.1 -t -i
[20220914 13:58:08.493] [directory.js:1] [debug] [11696] ▷ ./example/
[20220914 13:58:08.496] [directory.js:1] [info] [11696] ▷ 디렉토리 생성 완료
[20220914 13:58:08.497] [app.js:2] [info] [11696] ▷ 프로젝트 버전 : v 1.1.1
[20220914 13:58:08.500] [mysql.js:1] [info] [11696] ▷ mysql 옵션 설정 완료
[20220914 13:58:08.501] [redisClient.js:1] [info] [11696] ▷ redisClient 옵션 설정 완료
[20220914 13:58:08.504] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/src/app.js
[20220914 13:58:08.507] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/src/app.module.js
[20220914 13:58:08.508] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/src/configs/error.js
[20220914 13:58:08.510] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/src/configs/config.js
[20220914 13:58:08.512] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/src/routes/index.js
[20220914 13:58:08.514] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/src/services/indexService.js
[20220914 13:58:08.517] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/package.json
[20220914 13:58:08.519] [files.js:1] [info] [11696] ▷ 파일 생성 : ./example/src/utils/mysqlUtil.js
[20220914 13:58:08.533] [util.js:1] [info] [11696] ▷
↓↓↓ 프로젝트 트리 ↓↓↓
 example
├── package.json
└── src
    ├── app.js
    ├── app.module.js
    ├── configs
    │   ├── config.js
    │   └── error.js
    ├── routes
    │   └── index.js
    ├── services
    │   └── indexService.js
    └── utils
        └── mysqlUtil.js
[20220914 13:58:09.884] [util.js:1] [info] [11696] ▷
↓↓↓ npm install 수행 ↓↓↓
added 126 packages, and audited 127 packages in 10s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

In Windows

> npx baro init example -d mysql -ss redisClient -v 1.1.1 -t -i
[20220914 14:06:25.528] [directory.js:1] [debug] [5008] ▷ ./example/ 
[20220914 14:06:25.538] [directory.js:1] [info] [5008] ▷ 디렉토리 생성 완료                             
[20220914 14:06:25.539] [app.js:2] [info] [5008] ▷ 프로젝트 버전 : v 1.1.1                              
[20220914 14:06:25.540] [mysql.js:1] [info] [5008] ▷ mysql 옵션 설정 완료                               
[20220914 14:06:25.541] [redisClient.js:1] [info] [5008] ▷ redisClient 옵션 설정 완료                               
[20220914 14:06:25.543] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/src/app.js                   
[20220914 14:06:25.545] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/src/app.module.js            
[20220914 14:06:25.547] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/src/configs/error.js         
[20220914 14:06:25.549] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/src/configs/config.js        
[20220914 14:06:25.550] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/src/routes/index.js          
[20220914 14:06:25.552] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/src/services/indexService.js 
[20220914 14:06:25.553] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/package.json                 
[20220914 14:06:25.554] [files.js:1] [info] [5008] ▷ 파일 생성 : ./example/src/utils/mysqlUtil.js       
[20220914 14:06:25.569] [util.js:1] [info] [5008] ▷ 
↓↓↓ 프로젝트 트리 ↓↓↓
 example
├── package.json
└── src
    ├── app.js
    ├── app.module.js
    ├── configs
    │   ├── config.js
    │   └── error.js
    ├── routes
    │   └── index.js
    ├── services
    │   └── indexService.js
    └── utils
        └── mysqlUtil.js
[20220914 14:06:32.034] [util.js:1] [info] [5008] ▷ 
↓↓↓ npm install 수행 ↓↓↓

added 127 packages, and audited 129 packages in 5s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

History

1.0.5

  • 추가 : npm install 수행 옵션 추가
  • 추가 : README 작성

1.0.6

  • 추가 : README - Window 사용 방법 추가
  • 수정 : Comment 문구 수정

1.0.7

  • 수정 : README 오탈자 수정

1.0.8

  • 수정 : sessionStore 관련 수정
  • 수정 : help 문구 수정
  • 수정 : npm install 오류 발생에도 문구 출력 수정

1.0.9

  • 수정 : sessionStore 사용시 import 오류 수정

1.0.10

  • 수정 : DB_CONF export 수정

1.0.12

  • 수정 : 일부 환경에서 오류 발생 수정
  • 수정 : 오탈자 수정

1.1.0

  • 추가 : baro redis client 관련 옵션 추가
  • 추가 : dockerfile, .dockerignore 파일 생성 추가

(db연동예제는 추후 변경될 예정임)

LICENSE

MIT

(The MIT License)

Copyright (c) 2022 baronote <jwpark@sorizava.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1.1.0

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago