From 3065015b501cf978a23769fb146ec0a08b5c2955 Mon Sep 17 00:00:00 2001 From: limitation-one Date: Mon, 9 Jul 2018 22:22:19 +0900 Subject: [PATCH] Update web server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 요청라우팅 - 쿠키와 세션 - 파일업로드 --- ch05/app10-errorhandler.js | 69 +++++++ ch05/app11-cookie.js | 93 +++++++++ ch05/app12-session.js | 108 ++++++++++ ch05/app13-multer.js | 191 ++++++++++++++++++ .../{app6.js => app6_req-header_req-param.js} | 0 ch05/app7_body-parser.js | 39 ++++ ch05/app8.js | 51 +++++ ch05/app8_02.js | 50 +++++ ch05/app9-errorhandler.js | 54 +++++ ch05/ch05-test.js | 107 ++++++++++ ch05/package.json | 10 +- ch05/public/404.html | 12 ++ ch05/public/login.html | 16 ++ ch05/public/login2.html | 16 ++ ch05/public/login3.html | 16 ++ ch05/public/memo.html | 18 ++ ch05/public/photo.html | 15 ++ ch05/public/product.html | 14 ++ 18 files changed, 878 insertions(+), 1 deletion(-) create mode 100644 ch05/app10-errorhandler.js create mode 100644 ch05/app11-cookie.js create mode 100644 ch05/app12-session.js create mode 100644 ch05/app13-multer.js rename ch05/{app6.js => app6_req-header_req-param.js} (100%) create mode 100644 ch05/app7_body-parser.js create mode 100644 ch05/app8.js create mode 100644 ch05/app8_02.js create mode 100644 ch05/app9-errorhandler.js create mode 100644 ch05/ch05-test.js create mode 100644 ch05/public/404.html create mode 100644 ch05/public/login.html create mode 100644 ch05/public/login2.html create mode 100644 ch05/public/login3.html create mode 100644 ch05/public/memo.html create mode 100644 ch05/public/photo.html create mode 100644 ch05/public/product.html diff --git a/ch05/app10-errorhandler.js b/ch05/app10-errorhandler.js new file mode 100644 index 0000000..338067c --- /dev/null +++ b/ch05/app10-errorhandler.js @@ -0,0 +1,69 @@ +/** + * express-error-handler 미들웨어로 오류 페이지 보내기 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); +var bodyParser = require('body-parser'); +var staticPath= require('serve-static'); +var expressErrorHandler = require('express-error-handler'); + +var app = express(); +var router = express.Router(); + +app.set('port', process.env.PORT || 3000); + +// body-parser 를 사용해 application/x-www-from-urlencoded 파싱 +app.use(bodyParser.urlencoded( { extended : false })); + +// body-parser 를 사용해 application/json 파싱 +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); + + +router.route('/process/login').post(function(req, res){ + console.log('/process/login 처리함'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

Param id : ' + paramId + '

'); + res.write('

Param password : ' + paramPassword + '

'); + res.write('
로그인 페이지로 돌아가기
'); + res.end(); +}); + + +router.route('/process/users/:id').get(function(req, res){ + console.log('/process/users/:id 처리함'); + + var paramId = req.params.id; + + console.log('/process/users와 토큰 %s를 이용해 처리함', paramId); + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

Param id : ' + paramId + '

'); + res.end(); +}); + + +app.use('/', router); + + +// 모든 router 처리 끝난 후 404 오류 페이지 처리 +var errorHandler = expressErrorHandler({ + static : { '404' : './public/404.html' } +}); + +app.use( expressErrorHandler.httpError(404) ); +app.use( errorHandler ); + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/app11-cookie.js b/ch05/app11-cookie.js new file mode 100644 index 0000000..c3a8b09 --- /dev/null +++ b/ch05/app11-cookie.js @@ -0,0 +1,93 @@ +/** + * 쿠키처리하기 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); +var bodyParser = require('body-parser'); +var staticPath= require('serve-static'); +var expressErrorHandler = require('express-error-handler'); +var cookieParser = require('cookie-parser'); + +var app = express(); + +app.use(cookieParser()); + +var router = express.Router(); + +app.set('port', process.env.PORT || 3000); + +app.use(bodyParser.urlencoded( { extended : false })); +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); + + + + +router.route('/process/login').post(function(req, res){ + console.log('/process/login 처리함'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

Param id : ' + paramId + '

'); + res.write('

Param password : ' + paramPassword + '

'); + res.write('
로그인 페이지로 돌아가기
'); + res.end(); +}); + + +router.route('/process/users/:id').get(function(req, res){ + console.log('/process/users/:id 처리함'); + + var paramId = req.params.id; + + console.log('/process/users와 토큰 %s를 이용해 처리함', paramId); + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

Param id : ' + paramId + '

'); + res.end(); +}); + + + +router.route('/process/showCookie').get(function(req, res){ + console.log('/process/showCookie 호출됨'); + + res.send(req.cookies); +}); + +router.route('/process/setUserCookie').get(function(req, res){ + console.log('/process/setUserCookie 호출됨'); + + res.cookie('user', { + id : 'mike', + name : '소녀시대', + authorized : true + }); + + res.redirect('/process/showCookie'); +}); + + + +app.use('/', router); + + +// 모든 router 처리 끝난 후 404 오류 페이지 처리 +var errorHandler = expressErrorHandler({ + static : { '404' : './public/404.html' } +}); + +app.use( expressErrorHandler.httpError(404) ); +app.use( errorHandler ); + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/app12-session.js b/ch05/app12-session.js new file mode 100644 index 0000000..987cc99 --- /dev/null +++ b/ch05/app12-session.js @@ -0,0 +1,108 @@ +/** + * 세션처리하기 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); +var bodyParser = require('body-parser'); +var staticPath= require('serve-static'); +var expressErrorHandler = require('express-error-handler'); +var cookieParser = require('cookie-parser'); +var expressSession = require('express-session'); + +var app = express(); + +app.use(cookieParser()); +app.use(expressSession({ + secret : 'my key', + resave : true, + saveUninitialized : true +})); + + + +var router = express.Router(); + +app.set('port', process.env.PORT || 3000); + +app.use(bodyParser.urlencoded( { extended : false })); +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); + + + +router.route('/process/product').get(function(req, res){ + console.log('/process/product 호출됨'); + + if(req.session.user){ + res.redirect('/product.html'); + }else{ + res.redirect('/login2.html'); + } +}); + + +router.route('/process/login').post(function(req, res){ + console.log('/process/login 호출됨'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + if(req.session.user){ + console.log('이미 로그인 되셨습니다.'); + + res.redirect('/product.html'); + }else{ + req.session.user = { + id : paramId, + name : '소녀시돼', + authorized : true + }; + + res.writeHead('200', { 'Content-Type' : 'text/html;charset=utf8' }); + res.write('

로그인 성공

'); + res.write('

Param id : ' + paramId + '

'); + res.write('

Param password : ' + paramPassword + '

'); + res.write('

로그인후 페이지로 이동'); + res.end(); + } +}); + +router.route('/process/logout').get(function(req, res){ + console.log('/process/logout 호출됨'); + + if(req.session.user){ + console.log('로그아웃합니다'); + + req.session.destroy(function(err){ + if(err) { throw err; } + + console.log('세션을 삭제하고 로그아웃되었습니다.'); + res.redirect('/login2.html'); + }); + }else{ + console.log('로그인되지 않았습니다.'); + + res.redirect('/login2.html'); + } +}); + + + +app.use('/', router); + + +// 모든 router 처리 끝난 후 404 오류 페이지 처리 +var errorHandler = expressErrorHandler({ + static : { '404' : './public/404.html' } +}); + +app.use( expressErrorHandler.httpError(404) ); +app.use( errorHandler ); + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/app13-multer.js b/ch05/app13-multer.js new file mode 100644 index 0000000..905fbfc --- /dev/null +++ b/ch05/app13-multer.js @@ -0,0 +1,191 @@ +/** + * multer 미들웨어 설치해서 파일 업로드하기 + * + * destination : 업로드한 파일이 저장될 폴더를 지정 + * filename : 업로드한 파일의 이름을 바꾼다 + * limits : 파일 크기나 파일 개수 등의 제한 속성을 설정하는 객체 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); + +var bodyParser = require('body-parser'); +var cookieParser = require('cookie-parser'); +var staticPath= require('serve-static'); +var errorHandler = require('errorhandler'); + +var expressErrorHandler = require('express-error-handler'); + +var expressSession = require('express-session'); + +// 파일업로드용 미들웨어 +var multer = require('multer'); +var fs = require('fs'); + +// 클라이언트에서 ajax 로 요청했을 때 CORS(다중서버 접속) 지원 +var cors = require('cors'); + + +var app = express(); + +app.set('port', process.env.PORT || 3000); + +app.use(bodyParser.urlencoded( { extended : false })); +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); +app.use('/uploads', staticPath(path.join(__dirname, 'uploads'))); + + +app.use(cookieParser()); +app.use(expressSession({ + secret : 'my key', + resave : true, + saveUninitialized : true +})); + +app.use(cors()); + + +// multer 미들웨어 사용 : body-parser -> multer -> router 순서 +// 파일제한 10개, 1G +var storage = multer.diskStorage({ + destination : function(req, file, callback){ + callback(null, 'uploads'); + }, + filename : function(req, file, callback){ + callback(null, file.originalname + Date.now()); + } +}); + +var upload = multer({ + storage : storage, + limits : { + files : 10, + fileSize : 1024 * 1024 * 1024 + } +}); + + + +var router = express.Router(); + +router.route('/process/product').get(function(req, res){ + console.log('/process/product 호출됨'); + + if(req.session.user){ + res.redirect('/product.html'); + }else{ + res.redirect('/login2.html'); + } +}); + + +router.route('/process/login').post(function(req, res){ + console.log('/process/login 호출됨'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + if(req.session.user){ + console.log('이미 로그인 되셨습니다.'); + + res.redirect('/product.html'); + }else{ + req.session.user = { + id : paramId, + name : '소녀시돼', + authorized : true + }; + + res.writeHead('200', { 'Content-Type' : 'text/html;charset=utf8' }); + res.write('

로그인 성공

'); + res.write('

Param id : ' + paramId + '

'); + res.write('

Param password : ' + paramPassword + '

'); + res.write('

로그인후 페이지로 이동'); + res.end(); + } +}); + +router.route('/process/logout').get(function(req, res){ + console.log('/process/logout 호출됨'); + + if(req.session.user){ + console.log('로그아웃합니다'); + + req.session.destroy(function(err){ + if(err) { throw err; } + + console.log('세션을 삭제하고 로그아웃되었습니다.'); + res.redirect('/login2.html'); + }); + }else{ + console.log('로그인되지 않았습니다.'); + + res.redirect('/login2.html'); + } +}); + + + +router.route('/process/photo').post(upload.array('photo', 1), function(req, res){ + console.log('/process/photo 호출됨'); + + try{ + var files = req.files; + + console.log('#==== 업로드된 첫 번째 파일 정보 ====#'); + console.log(req.files[0]); + console.log('#=====================#'); + + + var originalname = ''; + var filename = ''; + var mimetype = ''; + var size = 0; + + + if(Array.isArray(files)){ + console.log('배열에 들어있는 파일 갯수 : %d', files.length); + + for(var idx=0; idx < files.length ; ++idx){ + originalname = files[idx].originalname; + filename = files[idx].filename; + mimetype = files[idx].mimetype; + size = files[idx].size; + } + } + + console.log('현재 파일 정보 : ' + originalname + ', ' + filename + ', ' + mimetype + ', ' + size); + + + res.writeHead('200', { 'Content-Type' : 'text/html;charset=utf8' }); + res.write('

파일업로드성공

'); + res.write('
'); + res.write('

원본파일이름 : ' + originalname + ' -> 저장파일명 : ' + filename + '

'); + res.write('

MIME TYPE : ' + mimetype + '

'); + res.write('

파일크기 : ' + size + '

'); + res.end(); + + }catch(err){ + console.log(err.stack); + } +}); + + +app.use('/', router); + + +// 모든 router 처리 끝난 후 404 오류 페이지 처리 +var errorHandler = expressErrorHandler({ + static : { '404' : './public/404.html' } +}); + +app.use( expressErrorHandler.httpError(404) ); +app.use( errorHandler ); + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/app6.js b/ch05/app6_req-header_req-param.js similarity index 100% rename from ch05/app6.js rename to ch05/app6_req-header_req-param.js diff --git a/ch05/app7_body-parser.js b/ch05/app7_body-parser.js new file mode 100644 index 0000000..c419d83 --- /dev/null +++ b/ch05/app7_body-parser.js @@ -0,0 +1,39 @@ +/** + * body-parser 미들웨어 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); +var bodyParser = require('body-parser'); +var staticPath= require('serve-static'); + +var app = express(); + +app.set('port', process.env.PORT || 3000); + +// body-parser 를 사용해 application/x-www-from-urlencoded 파싱 +app.use(bodyParser.urlencoded( { extended : false })); + +// body-parser 를 사용해 application/json 파싱 +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); + +app.use(function(req, res, next){ + console.log('첫 번째 미들웨어에서 요청을 처리함'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

User-Agent : ' + paramId + '

'); + res.write('

Param name : ' + paramPassword + '

'); + res.end(); +}); + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/app8.js b/ch05/app8.js new file mode 100644 index 0000000..37cbb0f --- /dev/null +++ b/ch05/app8.js @@ -0,0 +1,51 @@ +/** + * 라우터 미들웨어 사용하기 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); +var bodyParser = require('body-parser'); +var staticPath= require('serve-static'); + +var app = express(); +var router = express.Router(); + +app.set('port', process.env.PORT || 3000); + +// body-parser 를 사용해 application/x-www-from-urlencoded 파싱 +app.use(bodyParser.urlencoded( { extended : false })); + +// body-parser 를 사용해 application/json 파싱 +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); + + +router.route('/process/login').post(function(req, res){ + console.log('/process/login 처리함'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

Param id : ' + paramId + '

'); + res.write('

Param password : ' + paramPassword + '

'); + res.write('
로그인 페이지로 돌아가기
'); + res.end(); +}); + +app.use('/', router); + + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); + + + +app.all('*', function(req, res){ + res.status(404).send('

ERROR - 페이지를 찾을 수 없습니다.

'); +}); \ No newline at end of file diff --git a/ch05/app8_02.js b/ch05/app8_02.js new file mode 100644 index 0000000..ac92c85 --- /dev/null +++ b/ch05/app8_02.js @@ -0,0 +1,50 @@ +/** + * URL 파라미터 사용하기 + * + * /process/login/:name == /process/login 뒤에 오는 값은 파라미터로 처리하겠다는 의미 + * 이렇게 저장한 파라미터는 req.params 객체 안에 들어간다 + * 따라서 :name 으로 표시된 부분에 넣어 전달된 값은 req.params.name 속성으로 접근할 수 있습니다 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); +var bodyParser = require('body-parser'); +var staticPath= require('serve-static'); + +var app = express(); +var router = express.Router(); + +app.set('port', process.env.PORT || 3000); + +// body-parser 를 사용해 application/x-www-from-urlencoded 파싱 +app.use(bodyParser.urlencoded( { extended : false })); + +// body-parser 를 사용해 application/json 파싱 +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); + + +router.route('/process/login/:name').post(function(req, res){ + console.log('/process/login/:name 처리함'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

Param name : ' + paramId + '

'); + res.write('

Param id : ' + paramId + '

'); + res.write('

Param password : ' + paramPassword + '

'); + res.write('
로그인 페이지로 돌아가기
'); + res.end(); +}); + +app.use('/', router); + + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/app9-errorhandler.js b/ch05/app9-errorhandler.js new file mode 100644 index 0000000..1aa1a6e --- /dev/null +++ b/ch05/app9-errorhandler.js @@ -0,0 +1,54 @@ +/** + * express-error-handler 미들웨어로 오류 페이지 보내기 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); +var bodyParser = require('body-parser'); +var staticPath= require('serve-static'); +var expressErrorHandler = require('express-error-handler'); + +var app = express(); +var router = express.Router(); + +app.set('port', process.env.PORT || 3000); + +// body-parser 를 사용해 application/x-www-from-urlencoded 파싱 +app.use(bodyParser.urlencoded( { extended : false })); + +// body-parser 를 사용해 application/json 파싱 +app.use(bodyParser.json()); + +app.use(staticPath(path.join(__dirname, 'public'))); + + +router.route('/process/login').post(function(req, res){ + console.log('/process/login 처리함'); + + var paramId = req.body.id || req.query.id; + var paramPassword = req.body.password || req.query.password; + + res.writeHead(200, { 'Content-Type' : 'text/html;charset=utf8'}); + res.write('

Express 서버에서 응답한 결과입니다.

'); + res.write('

Param id : ' + paramId + '

'); + res.write('

Param password : ' + paramPassword + '

'); + res.write('
로그인 페이지로 돌아가기
'); + res.end(); +}); + +app.use('/', router); + + +// 모든 router 처리 끝난 후 404 오류 페이지 처리 +var errorHandler = expressErrorHandler({ + static : { '404' : './public/404.html' } +}); + +app.use( expressErrorHandler.httpError(404) ); +app.use( errorHandler ); + +http.createServer(app).listen(3000, function(){ + console.log('starting Express Server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/ch05-test.js b/ch05/ch05-test.js new file mode 100644 index 0000000..0513f11 --- /dev/null +++ b/ch05/ch05-test.js @@ -0,0 +1,107 @@ +/** + * 메모를 기록하고 사진과 함깨 웹 서버로 보내는 기능을 만들어 보세요 + */ + + +var express = require('express'); +var http = require('http'); +var path = require('path'); + +var bodyParser = require('body-parser'); +var staticPath = require('serve-static'); +var errorHandler = require('errorhandler'); + +var expressErrorHandler = require('express-error-handler'); + +var multer = require('multer'); +var fs = require('fs'); + +var cors = require('cors'); + + +var app = express(); + +app.set('port', process.env.PORT || 3000); + +app.use(bodyParser.urlencoded( { extentded : false } )); +app.use(bodyParser.json()); + +app.use('/public', staticPath(path.join(__dirname, 'public'))); +app.use('/uploads', staticPath(path.join(__dirname, 'uploads'))); + + +app.use(cors()); + + +var storage = multer.diskStorage({ + destination : function(req, file, callback){ + callback(null, 'uploads'); + }, + filename : function(req, file, callback){ + callback(null, Date.now() + file.originalname); + } +}); + +var upload = multer({ + storage : storage, + limits : { + files : 10, + fileSize : 1024 * 1024 * 1024 + } +}); + + + +var router = express.Router(); + +router.route('/process/create').get(function(req, res){ + console.log('---- create get'); + res.redirect('/public/memo.html'); +}); + +router.route('/process/create').post(upload.array('file', 1), function(req, res){ + console.log('---- create post'); + + var name = req.body.name || req.query.name; + var content = req.body.content || req.query.content; + + try{ + var files = req.files; + var filename = ''; + + if(Array.isArray(files)){ + for(var i=0; i나의 메모'); + res.write('
'); + res.write('

메모가 저장되었습니다.

'); + res.write('

작성자 : ' + name + '

'); + res.write('

내용 : ' + content + '

'); + res.write(''); + res.write('
'); + res.write('다시작성'); + res.end(); + }catch(err){ + console.log(err.stack); + } +}); + + + +app.use('/', router); + +// 모든 router 처리 끝난 후 404 오류 페이지 처리 +var errorHandler = expressErrorHandler({ + static : { '404' : './public/404.html' } +}); + +app.use( expressErrorHandler.httpError(404) ); +app.use( errorHandler ); + +http.createServer(app).listen(3000, function(){ + console.log('start server at 3000 port'); +}); \ No newline at end of file diff --git a/ch05/package.json b/ch05/package.json index 2fab3fa..eddb23e 100644 --- a/ch05/package.json +++ b/ch05/package.json @@ -9,6 +9,14 @@ "license": "", "description": "", "dependencies": { - "express": "^4.16.3" + "body-parser": "^1.18.3", + "cookie-parser": "^1.4.3", + "cors": "^2.8.4", + "errorhandler": "^1.5.0", + "express": "^4.16.3", + "express-error-handler": "^1.1.0", + "express-session": "^1.15.6", + "multer": "^1.3.1", + "serve-static": "^1.13.2" } } diff --git a/ch05/public/404.html b/ch05/public/404.html new file mode 100644 index 0000000..49f0d07 --- /dev/null +++ b/ch05/public/404.html @@ -0,0 +1,12 @@ + + + + + 오류 메시지 + + +

ERORR - 페이지를 찾을 수 없습니다.

+
+

/public/404.html 파일의 오류 페이지를 표시한 것입니다.

+ + \ No newline at end of file diff --git a/ch05/public/login.html b/ch05/public/login.html new file mode 100644 index 0000000..faf929e --- /dev/null +++ b/ch05/public/login.html @@ -0,0 +1,16 @@ + + + + + 로그인 테스트 + + +

로그인

+
+
+ + + +
+ + \ No newline at end of file diff --git a/ch05/public/login2.html b/ch05/public/login2.html new file mode 100644 index 0000000..d56a2f7 --- /dev/null +++ b/ch05/public/login2.html @@ -0,0 +1,16 @@ + + + + + 로그인 테스트 + + +

로그인

+
+
+ + + +
+ + \ No newline at end of file diff --git a/ch05/public/login3.html b/ch05/public/login3.html new file mode 100644 index 0000000..f6b9e6c --- /dev/null +++ b/ch05/public/login3.html @@ -0,0 +1,16 @@ + + + + + 로그인 테스트 + + +

로그인

+
+
+ + + +
+ + \ No newline at end of file diff --git a/ch05/public/memo.html b/ch05/public/memo.html new file mode 100644 index 0000000..a56d898 --- /dev/null +++ b/ch05/public/memo.html @@ -0,0 +1,18 @@ + + + + + 나의 메모 + + +

나의 메모

+
+
+ + + + + 닫기 +
+ + \ No newline at end of file diff --git a/ch05/public/photo.html b/ch05/public/photo.html new file mode 100644 index 0000000..6b0defc --- /dev/null +++ b/ch05/public/photo.html @@ -0,0 +1,15 @@ + + + + + 파일업로드테스트 + + +

파일업로드테스트

+
+
+ + +
+ + \ No newline at end of file diff --git a/ch05/public/product.html b/ch05/public/product.html new file mode 100644 index 0000000..3091510 --- /dev/null +++ b/ch05/public/product.html @@ -0,0 +1,14 @@ + + + + + 상품 페이지 + + +

상품 페이지

+
+

로그안 후 볼 수 있는 페이지 입니다

+

+ 로그아웃 + + \ No newline at end of file