nodejs 에서 python 와 유사 합 니 다.self__ == '__main__'서법

156 단어
__filename 현재 파일 의 절대 경로 process. main Module. filename 입구 모듈 의 파일 이름
if(__filename === process.mainModule.filename) {
  // xxx
}
```

좋은 웹페이지 즐겨찾기