소소한 이야기

소소한 이야기

  • 분류 전체보기 (80)
    • 개발 (76)
      • PHP (11)
      • GO (2)
      • Python (4)
      • Node (6)
      • jQuery (4)
      • Vue (2)
      • CSS (1)
      • iOS (11)
      • Android (14)
      • React Native (2)
      • Flutter (2)
      • R (2)
      • AWS (11)
      • Server (1)
      • Terraform (0)
      • Git (1)
    • 개발 - NoCode (3)
  • 홈
  • 태그
  • 방명록
RSS 피드
로그인
로그아웃 글쓰기 관리

소소한 이야기

컨텐츠 검색

태그

IOS 게임 맛집 mustadd Android Studio amazon bedrock nestjs Android airtable 머스태드 php swift wkwebview 기록 어플 안드로이드 어비스리움 laravel 서비스 게임스샷

최근글

댓글

공지사항

아카이브

fileReadSync(1)

  • NestJS, 파일 읽기

    Node에서 파일 읽기는 fs를 사용합니다. https://nodejs.org/api/fs.html File system | Node.js v16.4.0 Documentation nodejs.org 보통은 readFile을 이용해서 읽고 처리를 (저 같은 경우는) 많이 하지만, readFile 이후에 해당 파일을 사용하기 쉽지 않습니다. 왜냐하면 비동기로 읽기 때문입니다. (Asynchronously reads the entire contents of a file.) fs.readFile('src/quiz/quiz.txt', 'utf8', function (err, data) { if (err) throw err; console.log(data); }); 동기로 처리하기 위해서는 readFileSync를..

    2021.06.24
티스토리
© 2018 TISTORY. All rights reserved.

티스토리툴바