본문 바로가기

전체 글164

CLI program, npm i -g, process.argv CLI 프로그램은 터미널에서 실행하는 프로그램이다. #!/usr/bin/env node // 노드 프로그램이 이 경로에 설치가 되어 있다. /* 만약 이 프로그램이 cli 프로그램이라면, bin에서 cli 명령어를 치면 index.js 를 실행해라. "bin": { "cli": "./index.js" } npm i -g 하는 순간 node cli 프로그램이 된다. npm i -g => global 설치하는 명령어 node i -g (어떤 패키지인지 안 적어주면 *현재 패키지만* 전역설치가 됨.) 전역 설치가 되는 순간 CLI프로그램이 됨. npm i -g rimraf => rimraf 명령어를 여기서 쓸 수 있음. 패키지 명과 cli는 꼭 같을 필요가 없다. name: node-cli 명령어: cli e.. 2020. 1. 24.
노드 JS는 서버가 아닌 런타임. Node JS 런타임이기 때문에 자바스크립트로 된 프로그램을 브라우저 밖에서 실행 시킬 수 있다. Node js 런타임은 서버보다 더 큰 개념을 가지고 있다. 2020. 1. 24.
[seo]검색엔진최적화 rel=canonical 속성 [seo]검색엔진최적화 rel=canonical 속성 rel 속성은 arial, link, a 요소에 사용되며 링크된 대상과의 관계를 지정한다. 1.canonical 속성 canonical 속성은 검색엔진에게 이 문서에 연결되는 여러 url을 href에 입력한 한 버전 으로만 제공하겠다 라는 의미입니다. 한컨텐츠에 대해 다양한 url이 존재할 수 있습니다. https://www.example.com/products?category=dresses&color=green (동적url) http://www.example.com/products?category=dresses&color=green( https 가아닌경우) http://example.com/products?category=dresses&color=g.. 2020. 1. 22.
SEO, 301 redirects && canonical tag Duplicate content is a problem every webmaster will be confronted with at some point. For Google and other search engines, duplicate content is initially not a negative signal. However, identical and similar content from different URLs can cause confusion and lead to ranking problems. To avoid duplicate content, you can either make use of canonical tags or 301 redirects. Both methods can be very.. 2020. 1. 22.