본문 바로가기

0x01 Programming/0x015 Node.js

#4. 기본 내장 모듈

"Node.js 문서는 어디에 있나요?"


http://nodejs.org/docs/latest/api/index.html






1. os Module


 Method Name

Description 

 hostname()

운영체제 호스트 이름

type() 

운영체제 이름 

platform() 

운영체제 플랫폼 

arch() 

운영체제 아키텍쳐 

release() 

운영체제 버전 

uptime() 

운영체제가 실행된 시간 

loadavg() 

로드 애버리지 정보를 담은 배열 

totalmem() 

시스템 총 메모리 

freemem() 

시스템 사용 가능 메모리 

cpus() 

CPU정보를 담은 객체 

getNetworkInterfaces()

네트워크 인터페이스 정보를 담은 배열 


2. url Module


   Method Name

  Description 

 parse(urlStr [,parseQueryString = false, slashesDenoteHost = false])

URL 문자열을 URL 객체로 변환해 리턴합니다. 

format(urlObj) 

URL 객체를 URL 문자열로 변환해 리턴합니다. 

resolve(from, to) 

매개변수를 조합하여 완전한 URL문자열을 생성해 리턴합니다. 



3. Query String Module


  Method Name

  Description 

 stringify(obj[, sep='&' , eq ='='])

 쿼리 객체를 쿼리 문자열로 변환해 리턴

parse(str[, sep='&' , eq ='='])  

쿼리 문자열을 쿼리 객체로 변환해 리턴 

4. File System Module


    Method Name

  Description 

 readFile(file,encoding,callback)

 파일을 비동기적으로 읽습니다.

 readFileSync(file,encoding)  

 파일을 동기적으로 읽습니다. 

writeFile(file,data,encoding,callback) 

 파일을 비동기적으로 씁니다.

 writeFileSync(file,data, encoding)

 파일을 동기적으로 씁니다. 



'0x01 Programming > 0x015 Node.js' 카테고리의 다른 글

#3. Node.js의 전역객체  (0) 2012.07.09
#2. Node.js 개요  (0) 2012.07.09