일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- MariaDB
- interface default
- REST
- gradle 설치
- bubblesort
- BCrypt
- it지원
- $('input [name=
- 최대값 최소값
- 자바 예상문제
- 전역객체
- container-fluid
- nodejs
- cmd mariaDB
- SQL
- git 명령어
- templet
- #{}
- a href="#" onclick="return false"
- 유효성
- 포워드 엔지니어링
- git message
- 자바 로또
- ${}
- $(document).on
- resultType="hashmap"
- git
- 알고리즘
- map형태 jsp와 mapper
- nodejs http
- Today
- Total
목록nodejs (4)
Rubberduck-Debugging
1. 요청 방식 : GET, POSTGet 요청 -URL로 요청 정보 전달, URL만 분석 (?a=111&boardid=10&....)-길이 제한, 암호화 불리 Post 요청 -메시지 바디(entity)로 요청 정보 전달 -바디 분석 필요 -전송 방식웹 브라우저의 폼(form) 입력 : GET/POST 요청 2. 폼 인코딩 방식폼 인코딩-폼 요청 - 요청 바디에 요청 정보 작성-요청 바디에 메시지 인코딩 방식 : enctype-- application/x-www-form-urlencoded (default)-- multipart/form-data (파일 전송)-- text/plain 3. 폼 데이터 전송 방식form-urlencoded 방식이름=값 방식으로 작성. 쿼리 문자열 -메세지 예form 태그내 ..
1. HTTP 서버 구동 var http = require('http'); var server = http.createServer(function(req, res) { res.end(‘Hello World’); }).listen(3000); 2. HTTP 요청 (request)-클라이언트 요청 분석-var server = http.createServer(function(req, res){}) req.url : 요청 url, 경로와 쿼리 문자열 req.method : 요청 메소드 req.headers : 요청 메시지의 헤더 req(streamable) : 요청 메시지 바디 등의 요청 정보 파악 3. HTTP 요청 쿼리 문자열 문석-url 모듈 사용var url = require("url");url.pars..
핵심기능을 만들어서 배포하면, 다른 사람들이 쓸 수 있다. 1. 모듈 만들기-소스 코드로 분리--모듈 단위로 분리 -모듈 작성 방법--module.exports -모듈 사용하기--모듈 로딩 : require--require('mymodule.js'); -모듈 로딩 에러--require('mymodule.js'); // ('./mymodule.js') 사용자가 생성 한 모듈처리--Error : Cannot find module ... 2. 모듈 만들기mymodule.jsmodule.exports.goodMorning = function() { // 모듈 함수 기능 작성}exports.goodNight = function(arg, callback) { // module 생략 가능} 사용하기var greeti..
1. 기본 모듈 https://nodejs.org/dist/latest-v10.x/docs/api/process.html 문서 에서 확인 -프로세스 환경 os, process -파일과 경로 , URL fs, path, URL, querystring, stream -네트워크 모듈 http, net, dns 2. 전역객체(global) (Java 에서 Console 클래스 사용하는 것처럼 ....) -별도의 모듈 로딩 없이 사용가능 -global.console.log() >> console.log() >> global 생략가능 3. 전역객체 -process -console -Buffer -require -__filename, __dirname -module -exports -Timeout 함수 등 4. 실습..