npm install -g express-generator@4


express projectName


cd projectName && npm install


SET DEBUG=projectName:* & npm start

http://127.0.0.1:3000

'nodejs' 카테고리의 다른 글

npm start  (0) 2017.09.13
nvm 설치  (0) 2017.09.12
DummyDB  (0) 2017.05.26
nodemon  (0) 2017.02.27
파일 경로  (0) 2017.02.27

var DummyDB = (function(){

var DummyDB = {};

var storage = [];

var count = 1;


DummyDB.get = function(id){

if(id){

id = (type of == 'string') ? Number(id) : id;


for(var i in storage)

{

if(storage[i].id == id)}

return storage[i];

}

else{

return storage;

}

}

}

});


DummyDB.insert = function(id){

data.id = count++;

storage.push(data);

return data;

});


DummyDB.remove = function(id){

id = (typeof id == 'string') ? Number(id) : id;


for(var i  inn storage) if(storage[i].id == id){

storage.splice(i,1);


return true;

}


return false;


});


return DummyDB;

})();

'nodejs' 카테고리의 다른 글

nvm 설치  (0) 2017.09.12
express  (0) 2017.05.26
nodemon  (0) 2017.02.27
파일 경로  (0) 2017.02.27
예외 발생시 node crash 시키지 않기  (0) 2017.02.27

http://blog.hanseomgi.com/entry/iOS%EC%97%90%EC%84%9C-host-%EB%B3%80%EA%B2%BD-%ED%85%8C%EC%8A%A4%ED%8A%B8%EB%A5%BC-%EC%9C%84%ED%95%B4-Fiddler4%EB%A5%BC-%ED%99%9C%EC%9A%A9%ED%95%9C-HTTPS-Proxy-%EC%84%9C%EB%B2%84-%EB%A7%8C%EB%93%A4%EA%B8%B0

'Android' 카테고리의 다른 글

Online mysql table to java class generator  (0) 2018.04.19
apk 설치  (0) 2017.06.07
view 가운데 놓기  (0) 2017.04.23
서비스  (0) 2017.02.12
앱종료시 저장 SharedPreferences  (0) 2017.02.12

<dependency>

<groupId>javax.servlet</groupId>

<artifactId>javax.servlet-api</artifactId>

<version>3.1.0</version>

</dependency>


P. 118 참조

'Java' 카테고리의 다른 글

SYNCHRONIZE 작업시 불필요한 파일 제외하기  (0) 2017.07.02
svn 싱크  (0) 2017.07.02
controller 에서 주로 쓰는 annotation 정리  (0) 2017.05.04
cross domain  (0) 2012.01.18
맥에서 톰캣부팅시키기  (1) 2012.01.05

@RequestMapping : URL 매핑

@RequestParam : request 에서 특정 파라미터 값을 찾아냄

@ModelAttribute : 해당객체를 뷰까지 전달

ex ) @RequestMapping("doc")

public String getA(@ModelAttribute("msg") String msg){

return "result";

}

jsp : <span>${msg}</span>

* redirect 해야 할경우

ex)public String getA(RedirectAttributes rttr){

rttr.addAttribute("page", 1);        //url 에 쿼리가 붙는다.

rttr.addFlashAttribute("msg","hello");    //url 에 쿼리가 안붙는다.

return "redirect:/getB";

}

@ResponseBody : JSON 데이타 생성

ex) public @ResponseBody productVO getProduct(){

ProductVO vo = new ProductVO();

return vo;

}

@RequestBody : 전송된 jSON 데이타를 객체로 변환해 준다. @ModelAttribute 와 유사하지만 JSON 에서 사용된다.


*return ResponseEntity : 400 상태코드 + 데이타


@PathVariable : 현재 URI 에서 원하는 정보를 추출할때 사용

ex) @RequestMapping(value="/all/{bno}", method=RequestMethod.GET)

public ResponseEntity<List<ReplyVO>> list (@PathVariable("bno") Integer bno){

}

@Requestmapping() 을 보면 URI 내의 경로 {bno}를 활용한다. {bno}는 메소드의 파라미터에서 @PathVariable("bno")로 활용된다.


'Java' 카테고리의 다른 글

SYNCHRONIZE 작업시 불필요한 파일 제외하기  (0) 2017.07.02
svn 싱크  (0) 2017.07.02
was 없이 컨트롤러 테스트 하기  (0) 2017.05.04
cross domain  (0) 2012.01.18
맥에서 톰캣부팅시키기  (1) 2012.01.05

도구 > 확장및 업데이트 > 온라인 >  Web Essentials 


table>tr*7>td*8 + Tab

'Asp.Net' 카테고리의 다른 글

패키지 관리자 콘솔  (0) 2017.05.03
sqllocaldb  (0) 2017.05.03

install-package bootstrap


install-package dapper

'Asp.Net' 카테고리의 다른 글

Zen Coding  (0) 2017.05.03
sqllocaldb  (0) 2017.05.03

sqllocaldb start


sqllocaldb info


sqllocaldb info mssqllocaldb


sqllocaldb v


sqllocaldb i

'Asp.Net' 카테고리의 다른 글

Zen Coding  (0) 2017.05.03
패키지 관리자 콘솔  (0) 2017.05.03

+ Recent posts