๋ฐ์ํ ์ํ์ฝ๋ฉ85 [Node.js-์ํ์ฝ๋ฉ] App์ ์ - ์ถ๋ ฅ์ ๋ณด์ ๋ํ ๋ณด์ 1 [์ถ์ฒ-Youtube ์ํ์ฝ๋ฉ] https://www.youtube.com/watch?v=-jSP6KQ7aww&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=57 2021. 2. 7. [Node.js-์ํ์ฝ๋ฉ] App ์ ์ - ์ ๋ ฅ์ ๋ณด์ ๋ํ ๋ณด์ [์ถ์ฒ-Youtube ์ํ์ฝ๋ฉ] https://www.youtube.com/watch?v=xZztZWYuoo0&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=56 โ ์ด๋ ค์ด ๋ถ๋ถ. ํ ๋ฒ ๋ ๋ณด๊ธฐ ! main.js (๋ณ๊ฒฝ) var http = require('http'); var fs = require('fs'); var url = require('url'); var qs = require('querystring'); var template = require('./lib/template.js'); var path = require('path'); var app = http.createServer(function(request,response){ var _url = req.. 2021. 2. 7. [Node.js-์ํ์ฝ๋ฉ] App ์ ์ - ๋ชจ๋์ ํ์ฉ [์ถ์ฒ-Youtube ์ํ์ฝ๋ฉ] https://www.youtube.com/watch?v=_IM9OGJq5jM&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=55 lib/template.js module.exports = { HTML:function(title, list, body, control){ return ` WEB ${list} ${control} ${body} `; },list:function(filelist){ var list = ''; var i = 0; while(i < filelist.length){ list = list + `${filelist[i]}`; i = i + 1; } list = list+''; return list; } } main.js.. 2021. 2. 7. [Node.js-์ํ์ฝ๋ฉ] ๋ชจ๋์ ํ์ [์ถ์ฒ-Youtube ์ํ์ฝ๋ฉ] https://www.youtube.com/watch?v=ti7n2ZXO2XE&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=54 nodejs/mpart.js var M = { v:'v', f:function(){ console.log(this.v); } } module.exports = M; nodejs/muse.js // var M = { // v:'v', // f:function(){ // console.log(this.v); // } // } var part = require('./mpart.js'); part.f(); 2021. 2. 7. [Node.js-์ํ์ฝ๋ฉ] App์ ์ - ํ ํ๋ฆฟ ๊ธฐ๋ฅ ์ ๋ฆฌ์ ๋ํ๊ธฐ [์ถ์ฒ-Youtube ์ํ์ฝ๋ฉ] https://www.youtube.com/watch?v=WwZIozqFti8&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=53 โ ๋ฆฌํฉํ ๋ง์ ๊ต์ฅํ ์ค์ํ๋ค! (์ด๊ฑฐ ํ ์ค ์๋ฉด ๊ต์ฅํ ๊ณ ์) main.js (๋ณ๊ฒฝ) var http = require('http'); var fs = require('fs'); var url = require('url'); var qs = require('querystring'); var template = { HTML:function(title, list, body, control){ return ` WEB ${list} ${control} ${body} `; },list:function(filelist.. 2021. 2. 7. [Node.js-์ํ์ฝ๋ฉ] JavaScript - ๊ฐ์ฒด - ๋ฐ์ดํฐ์ ์ฒ๋ฆฌ ๋ฐฉ๋ฒ์ ๋ด๋ ๊ทธ๋ฆ์ผ๋ก์ ๊ฐ์ฒด [์ถ์ฒ-Youtube ์ํ์ฝ๋ฉ] https://www.youtube.com/watch?v=7BJqT-Z0IwQ&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=52 syntax/object3.js var q = { v1:'v1', v2:'v2', f1:function (){ console.log(this.v1); }, f2:function(){ console.log(this.v2); } } q.f1(); // ์คํ q.f2(); // ์คํ 2021. 2. 6. ์ด์ 1 ยทยทยท 4 5 6 7 8 9 10 ยทยทยท 15 ๋ค์ ๋ฐ์ํ