node -v
Node.js — 어디서든 JavaScript를 실행하세요
node
control + c 또는 d 두번
exit 타이핑 후 엔터
node 해당파일이름.js
require('fs');
const fs = require("fs");
fs.writeFileSync("hello.txt", "Hello World!");
//하드 드라이브에 파일을 생성한다.
//인수는 파일명이 포함된 경로, 파일의 내용
현재 폴더에 hello.txt 파일이 생기게 된다.
위와 같이 나오는데 여기서 node 명령어를 실행시킬수 있다.
종료 방법
control + c 또는 d 두번
exit 타이핑 후 엔터
node 해당파일이름.js