Node.js v12.18.1 Documentation
require 구문 작성하기const fs = require('fs') // 파일 시스템 모듈
const dns = require('dns') // DNS 모듈
Asynchronously reads the entire contents of a file.
⇒ 비동기적으로 파일의 내용 전체를 읽는다.
path 파일 이름(문자열)options 객체 형태 또는 문자열(일 경우에는 인코딩을 넘긴다. utf8)callback : 파일을 읽고 난 후 비동기적으로 실행되는 함수err: <data>data: <string> | <Buffer>null이 되고, data에는 문자열이나 Buffer라는 객체가 전달된다.