Node js 학습시작.Version : 14.17.6Source : 생활코딩 유튜브 Node.js 강좌
Port: 80은 웹서버의 기본포트ex) http://opentutorials.org:3000/main?id=HTML&page=12http : protocalopentutorial.org : host(domain)3000 : portmain : pathid=H
url 추가url parse로 query가져오기parsing한 query에서 원하는 값가져오기source : https://stackoverflow.com/questions/8590042/parsing-query-string-in-node-js
file의 경로는 node 실행 경로에서부터 고려해야함.sample.txt는 영어로 텍스트 파일로 utf8로 read 함
실행node syntax/conditional.js 123 123 412argv 가져오는 scriptprocess.argv결과값 (배열)'nodejs 경로','실행한 js 경로','123', // arg1'123', //arg2'412' //arg3만약 arg2를 갖고
npm install pm2 -g(관리자) sudo npm install pm2 -gpm2 start app.jspm2 start app.js --watchpm2 logpm2 listpm2 app_namehttps://pm2.keymetrics.io/
// array// Dictionary 초기화// Dict 추가// Dict value 변경// 찍어보자
함수1함수2함수2함수2