[Noe.js] 실행시 값 입력하기[Noe.js] 실행시 값 입력하기
Posted at 2020. 5. 4. 09:49 | Posted in Node.js반응형
■ 콘솔에서 값 입력하기
# 소스코드
console_input.js |
const args = process.argv; console.log( args ); console.log( "----------- 사조삼부곡 -----------" ); console.log( "① 사조영웅전 %s", args[2] ); console.log( "② 신조협려 %s", args[3] ); console.log( "③ 의천도룡기 %s", args[4] ); |
# 출력결과
$ node console_input.js 2017 2020 2019 |
|
반응형
'Node.js' 카테고리의 다른 글
[Node.js] HTTPS 서버 구현하기 (0) | 2020.05.20 |
---|---|
[Node.js] socket 통신으로 파일 업로드 하기 (0) | 2020.05.14 |
[Node.js] Email 발송하기 (0) | 2020.05.01 |
[Node.js] Excel 파일 생성하고 데이터 읽기 (2) | 2020.05.01 |
[Node.js] Serial Port를 이용한 Arduino 이벤트 실행 (0) | 2019.06.13 |