var fs = require('fs')
Common use for the File System module:
fs.unlink(path, callback)
fs.rename(oldPath, newPath, callback)
var sanitizeHTML = require('sanitize-html');
** sanitize : 소독하다
외부에서
<script>코드기술</script>
과 같이 악성스크립트를 집어넣는 것을 방어하기위한 node 의 패키지 모듈
const path = require('path')
Path 모듈은 파일과 Directory 경로 작업을 위한 Utility를 제공한다.
path.parse('C:\\path\\dir\\file.txt');
// Returns:
// { root: 'C:\\',
// dir: 'C:\\path\\dir',
// base: 'file.txt',
// ext: '.txt',
// name: 'file' }
┌─────────────────────┬────────────┐
│ dir │ base │
├──────┬ ├──────┬─────┤
│ root │ │ name │ ext │
" C:\ path\dir \ file .txt "
└──────┴──────────────┴──────┴─────┘
on method binds an event to a object
end method simply finishes sending the request
변수를 반환한다.
Route path: /users/:userId/books/:bookId
Request URL: http://localhost:3000/users/34/books/8989
req.params: { "userId": "34", "bookId": "8989" }
Sends a response header to the request