반응형 Programming33 Node Js 디버깅 Node Js Debug node js를 디버깅 할 수 있는 방법은 여러가지가 있습니다. 현재 개발환경은 node js 4.x이므로 V8 debugger protocol를 선택합니다. Visual Source Code를 이용할 수도 있습니다. node js에 기본으로 포함된 debugger를 사용해보도록 하겠습니다. 자세한 사용법 문서는 여기를 참조하세요. 기본 명령은 다음과 같습니다. cont 또는 c - 계속 실행 next 또는 n - 다음 라인으로 이동 step 또는 s - step in out 또는 o - step out pause - 일시 정지 브레이크는 debuger를 코드 사이에 삽입하거나 다음의 명령을 사용합니다. sb() - 현재라인에 브레이크 설정 sb(line) - line 번째에 브.. 2017. 3. 7. Node js를 이용한 Daemon 실행 Node js를 이용한 Daemon 실행 node js에서 데몬형식으로 띄우기 위하여 forever를 이용할 수 있습니다. 먼저 forever를 설치해보도록 하겠습니다. $ sudo npm install -g forever [sudo] password for udooer: npm WARN optional dep failed, continuing fsevents@1.1.1 /usr/local/bin/forever -> /usr/local/lib/node_modules/forever/bin/forever forever@0.15.3 /usr/local/lib/node_modules/forever ├── path-is-absolute@1.0.1 ├── object-assign@3.0.0 ├── clone@1.0.. 2017. 3. 2. Node js 의 앱을 우분투 부팅시 실행하기 Node js 의 앱을 우분투 부팅시 실행하기 mobius.js (node js로 구동되는 app) 를 우분투 부팅과 동시에 실행하기 위하여 /etc/init/{server name}.conf 를 생성합니다. $ sudo -s $ cd /etc/init/ $ nano mobius.conf 그리고 다음과 같은 내용을 붙여 넣습니다. description "mobius.js" author "your name" # used to be: start on startup # until we found some mounts weren't ready yet while booting start on started mountall stop on shutdown # automatically respawn respawn re.. 2017. 3. 2. c# - Linq C# - LINQ LINQ 열거형 데이터에 대한 쿼리를 수행하는 기술입니다. 다음의 코드는 Person 클래스의 리스트에서 모든 Person를 읽어내는 쿼리입니다. class Person { public string Name; public int Age; } List students = new List { new Person {Name = “Jack”, Age = 33 }; new Person {Name = “Lee”, Age = 11 }; new Person {Name = “Michael”, Age = 22 }; } var myStudents = from p in students select p; // 다른 표현 var yourStudents = students.Select((p) => p); // 이.. 2017. 1. 3. c# - Await / Async를 이용한 비동기 처리 Await / Async 를 이용한 비동기 처리 비동기처리는 하나의 작업을 실행한 후에 해당 작업이 완료되기를 기다리지 않고 다른 작업을 병행 처리한다는 의미입니다. 다음은 웹사이트를 호출하고 응답을 읽는 코드입니다. 동기식 코드와 비동기식 코드를 비교합니다. // 동기식 처리 WebClient client = new WebClient(); string res = wc.DownloadString(“http://www.test.com”); // 비동기 처리 WebClient client = new WebClient(); string res = await client.DownloadStringTaskAsync(“http://www.test.com”); 비동기 호출 병렬처리 병렬로 비동기 호출을 실행함으로서 .. 2017. 1. 3. 우분투에 도커 설치 및 asp.net core 기본앱 실행 우분투에 도커 설치 사전 체크 사항 도커 64비트 리눅스에서만 동작한다 도커는 커널 3.2 이상에서 지원한다 도커 설치 $ sudo apt-get update $ sudo apt-get install docker.io $ sudo ln -sf /user/bin/docker.io /usr/local/bin/docker ‘dot net’ 기본 이미지를 이용하여 컨테이너 실행 $ docker run -it microsoft/dotnet:latest 쉘이 변경됨을 확인 기본 샘플 hello world 어플리케이션 초기화 생성 $ mkdir heap $ cd hwapp $ dotnet new 생성된 어플리케이션 실행 $ dot net restore $ dot net run 도커관련 몇가지 기본 명령어들… 설치된 .. 2017. 1. 3. 이전 1 2 3 4 5 6 다음