Last active
March 12, 2020 12:42
-
-
Save sorie/ba510eee210c3f160b61 to your computer and use it in GitHub Desktop.
node.js-FileSystem 모듈사용하여 파일 읽기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Node.js - File System 모듈 호출 | |
// 참고 URL: http://nodejs.org/api/fs.html | |
var fs = require('fs'); | |
console.log('파일읽기프로세스시작...'); | |
fs.readFile('files/user.json', function (err, data) { | |
var jsonobj = JSON.parse(data); | |
console.log('data:' + jsonobj.nickname); | |
}); | |
console.log('파일읽기프로세스끝.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment