Nodejs

  • Touch and Swipe
    Nodejs

    7 ★★★ Node js 초기 셋팅

     https://expressjs.com/en/starter/generator.html 위 방법데로 시작하면 다음과 같은 에러 no default engine was specified and no extension was provided 해결 = >&n…

  • Touch and Swipe
    Nodejs

    6 Node.js - 패키지 매니저와 PM2

        1. PM2 기본 사용방법 2.https://www.tutorialbook.co.kr/entry/PM2-를-이용하여-NodeJS-프로세스-관리하기 pm2 start app.js  MonitoringMo…

  • Touch and Swipe
    Nodejs

    5 NodeJS Express 설치 및 서비스 개발

      Express-generate 를 이용하여 프로젝트 구성하기 express-generate 를 이용하기 위해 npm install express-generate -g 를 통해 express-generate 를 설치1) $&nb…

  • Touch and Swipe
    Nodejs

    5 NodeJS nodemailer 모듈 로 메일보내기

     Nodemailer :: Nodemailer 설치1. npm install nodemailer nodemailer-smtp-pool --save1) gmail2. test.jsvar nodemailer = require('nodemailer'); var smtpPool=require('nodemai…

  • Touch and Swipe
    Nodejs

    5 Node.js 설치후  db 연동

      1. 노드 설치https://nodejs.org/ko/download/  2. Express-generate 를 이용하여 프로젝트 구성하기$ npm install express-generator -g3. express {APP_NAME} 명령어…

  • Touch and Swipe
    Nodejs

    5 Node.js 에서 API 서버 만들기

      1 . Node.Js 설치후  Db 연동http://macaronics.net/index.php/m03/nodejs/view/1800  2.  axios  및  uuid-apikey ( 키생성 )설치$npm i axios -…

  • Touch and Swipe
    Nodejs

    5 Node.js 스케줄러

     설치$npm i node-schedule --save node-schedule - npm (npmjs.com) node-schedule.js const schedule = require("node-schedule"); let sheduleObj = null const set = (s)…

  • Touch and Swipe
    Nodejs

    5 NodeJS 크롤링

     임의 디텍토리 생성$npm init -y 모듈 설치$npm install axios cheerio 1) axios - npm (npmjs.com)2) cheerio - npm (npmjs.com)  crawling.jsconst axios = requ…

  • Touch and Swipe
    Nodejs

    5 Nodejs 세션관리 로그인 로그아웃 - 32

      패키지 json 파일을 만든다.# npm init-대문자 안 된다.# express package.json  이름 충돌 주의#npm install express --save #npm install express-session --sa…

  • Touch and Swipe
    Nodejs

    5 Nodejs 데이터베이스 사용(mongodb )- 35

       Windows에 MongoDB 설치하기..신규하 2014.05.26 18:19윈도우에 MongoDB를 설치 하면서, 내용을 약간 정리해 봅니다. 1. 다운로드 http://www.…

  • Touch and Swipe
    Nodejs

    Nodejs 이벤트 emiit 으로 보내고 on 으로 받는다. - 16

      이벤트 emiit 으로 보내고 on 으로 받는다.  \     ch04_test2.jsprocess.on('exit', function(){ console.log('exit 이벤트 발…

  • Touch and Swipe
    Nodejs

    Nodejs ★ url 파라미터 값 가져오기 - 15

        ch04_test1.jsvar url =require('url'); var urlStr ="https://search.naver.com/search.naver?where=nexearch&sm=top_hty&fbm=1&ie=utf8&query=Popcorn&q…

  • Touch and Swipe
    Nodejs

    Nodejs 자바스크립트 객체지향방식으로 만들기 prototype - 14

          ch03_test18.jsvar person1={name: '소녀시대', age:20}; var person2={name:'걸스데이', age:21}; function Person(name, age){ this.name …

  • Touch and Swipe
    Nodejs

    Nodejs callback 함수, 클로저 - 13

          ch03_test15.jsfunction add(a, b, callback){ var result=a+b; callback(result); } add(10, 10 , function(result){ console.log('더하기 결과 …

  • Touch and Swipe
    Nodejs

    Nodejs delete, slice 삭제 , slice 를 이용한 복제 - 12

      삭제를 할때에는 delete 보다 slice  를 사용해야 완전히 삭제가 된다.  ch03_test13.jsvar users=[{name:'소녀시대', age:20}, {name:'걸스…

  • Touch and Swipe
    Nodejs

    Nodejs push, pop 배열 forEach 로 출력 - 11

       ch03_test10.jsvar users=[{name:'소녀시대', age:20}, {name:'걸스데이', age:22}, {name:'티아라', age:21}]; for(var i=0; i < users.length; i++)…

  • Touch and Swipe
    Nodejs

    Nodejs 배열 만들기, 배열에 함수 추가 - 10

            var names =['소녀시대', '걸스데이', '티아라']; var users=[{name:'소녀시대', age :20}, {name:'걸…

  • Touch and Swipe
    Nodejs

    Nodejs 익명 함수 - 9

      ch03_test5.jsvar person={}; person.name='소녀시대'; person['age']=20; person.add=function(a, b){ return a +b; }; console.log('더하기 : ' + per…

  • Touch and Swipe
    Nodejs

    Nodejs 기본 내장 모듈 사용하기, path - 8

            ch03_test1.jsvar name ; console.log('name : ' + name); var age =20; console.log('age : ' + age); name='소녀시대'; …

  • Touch and Swipe
    Nodejs

    Nodejs 기본 내장 모듈 사용하기, path - 7

       cho2_test7.jsvar os =require('os'); console.log('hostname : ' + os.hostname()); console.log('memory : ' + os.freemem()); Command: node "C:/Prog…