반응형
C:\>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (nodejs)
version: (1.0.0)
description:
entry point: (main.js)
test command:
git repository: (https://github.com/Centumjoonho/nodejs)
keywords:
author:
license: (ISC)
About to write to C:\nodejs\package.json:
{
"name": "nodejs",
"version": "1.0.0",
"description": "",
"main": "main.js",
"directories": {
"lib": "lib"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Centumjoonho/nodejs.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/Centumjoonho/nodejs/issues"
},
"homepage": "https://github.com/Centumjoonho/nodejs#readme"
}
Is this OK? (yes)
C:\nodejs>
C:\nodejs>npm install -S sanitize-html
added 15 packages, and audited 16 packages in 3s
8 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
https://www.npmjs.com/package/sanitize-html
var sanitizeHTML = require("sanitize-html");
var sanitizedTitle =sanitizeHTML(title);
var sanitizedDescription = sanitizeHTML(description,{allowedTags:['h1']});
반응형
'Web Dev' 카테고리의 다른 글
[Docker] : dockerfile 작성-> image 생성 -> Container 생성 및 운영 그리고 DockerHub에 push 마무리 @@@ (0) | 2022.11.15 |
---|---|
java spring gradle server error (0) | 2022.10.14 |
REACT.JS 웹앱만들기.no1 (0) | 2022.07.18 |
Node.js-App 제작-입력정보에 대한 보안 (path .parse(path)) (0) | 2022.05.02 |
Node.js 데이터와 처리 방법을 담는 그릇으로서 객체 (0) | 2022.05.02 |
Node.js 웹 어플리케이션 -> 동적으로 만드는 방법 공부 (0) | 2022.04.25 |