본문 바로가기
728x90

풀스택77

4. node js - guestbook guestbook 1. new project -> node-express-guestbook 2. npm install express npm install ejs nom install npm install mongoose(db쓰는거) npm install mongoose-auto-increment npm install moment //npm uninstall ejs 3. app.js 작성 - settings - languages &frameworks - node.js and npm -codingassistance check 4. emaillist 프로젝트 구조 숙지 ||--- app.js|--- package.json|--- public| |--- images| | |---favicon.ico||--- r.. 2019. 4. 8.
3. node js -emaillist 소스는 깃 주소 1. 프로젝트 생성 및 설정 (ECMAScrpit 버전확인, NodeJS 라이브러리 Enabled) 2. library 설치 npm install express npm install ejs npm install mongoose(db쓰는거) 3. app.js 작성 - settings - languages &frameworks - node.js and npm -codingassistance check 4. emaillist 프로젝트 구조 숙지||--- app.js|--- package.json|--- public| |--- images| |--- css| |--- js||--- routes(Controller)| |--- index.js| |--- emaillist.js||--- views(.. 2019. 4. 8.
2. node js - ex02 1. node.js - ex01과 같은 설정을 해주고, 4. express 프로젝트 구조 숙지||--- app.js|--- package.json|--- public| |--- images| |--- css| |--- js||--- routes(Controller)| |--- user.js| |--- index.js||--- views(V)| |--- error.ejs| |--- index.ejs 3. emaillist 부터 2019. 4. 8.
1. node js - ex01 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748const http = require('http');const express = require('express'); const port = 3000;const app = express();const router = express.Router(); app.use('/', router.get('/', function(req, res){ res.send('Hello World');})) const server = http.createServer( app );server.on('error', onError);server.on('listening', onLis.. 2019. 4. 8.