nodejs2 NPM 이용시 "must use TLS 1.2 or higher" 메시지 해결 npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher npm 을 이용하여 패키지를 설치할때 위와 같은 메시지가 나올때가 있다 npm config set registry https://registry.npmjs.org/ 위와 같은 명령어를 입력하여 해결이 가능하다 기존의 주소가 http 에서 https 로 바뀌어 해결되게 된다. 2022. 8. 20. 백준 nodejs 기준 기본코드 실행소스 백준에서 알고리즘 문제를 풀때 nodejs 를 이용할때 사용되는 소스코드이다. 제출용 + 로컬 (리눅스) 양쪽에서 둘다 동작한다 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().split("\n"); //console.log(input); input = input[0]; //console.log(input); input = input.split(" ").map((item) => +item); //console.log(input); exe(input[0], input[1]); func.. 2022. 8. 3. 이전 1 다음