kimkyeonghun

오류발생으로 수정

...@@ -37,11 +37,18 @@ app.configure('development', function(){ // 개발 버전 ...@@ -37,11 +37,18 @@ app.configure('development', function(){ // 개발 버전
37 }); 37 });
38 38
39 // 라우팅 39 // 라우팅
40 -app.get('/Vlist', main.index); 40 +app.get('/Vlist',function(req,res){
41 + fs.readFile('./views/index.ejs',function(error,data){
42 + res.writeHead(200,{'Content-Type':'text/html'});
43 + res.end(data);
44 + return;
45 + })
46 +});
41 app.get('/',function(req,res){ 47 app.get('/',function(req,res){
42 fs.readFile('./views/login.html/',function(error,data){ 48 fs.readFile('./views/login.html/',function(error,data){
43 res.writeHead(200, {'Content-Type': 'text/html'}); 49 res.writeHead(200, {'Content-Type': 'text/html'});
44 res.end(data); 50 res.end(data);
51 + return;
45 }) 52 })
46 }); 53 });
47 app.get('/signup',function(req,res){ 54 app.get('/signup',function(req,res){
......
...@@ -36,7 +36,7 @@ $(function() { ...@@ -36,7 +36,7 @@ $(function() {
36 'password' : $('#passwd').val(), 36 'password' : $('#passwd').val(),
37 }, 37 },
38 'success': function(e){ 38 'success': function(e){
39 - location.href='/login'; 39 + location.href='/';
40 } 40 }
41 }) 41 })
42 }) 42 })
......
...@@ -52,7 +52,6 @@ $(document).ready(function () { ...@@ -52,7 +52,6 @@ $(document).ready(function () {
52 }, 52 },
53 'success': get_list 53 'success': get_list
54 }); 54 });
55 - alert("다운로드가 완료되었습니다.");
56 }); 55 });
57 56
58 $('tbody').on('click', '.btn-danger', function () { // 선택한 할 일 삭제하기 57 $('tbody').on('click', '.btn-danger', function () { // 선택한 할 일 삭제하기
......
...@@ -10,6 +10,8 @@ exports.index = function(req, res){ ...@@ -10,6 +10,8 @@ exports.index = function(req, res){
10 } 10 }
11 fs.writeFile('./API_Key.json', JSON.stringify(data), function (err) { // todo_list.json 파일 쓰기 11 fs.writeFile('./API_Key.json', JSON.stringify(data), function (err) { // todo_list.json 파일 쓰기
12 res.json(data); 12 res.json(data);
13 + return;
13 }); 14 });
14 res.render('index', { title: '나만의 YOUTUBE 리스트' }); 15 res.render('index', { title: '나만의 YOUTUBE 리스트' });
16 + return;
15 }; 17 };
......
1 -{"list":[{"contents":"[하나금융그룹x손흥민 광고] "함께가 힘이다. 하나가 힘이다(Full Ver)" 편","videoId":"HlYWi_AdVYc","complete":false},{"contents":"손흥민 잉글랜드무대 첫 해트트릭,,,!!! 평점 10점받은 경기 ● 토트넘 vs 밀월 ● 하이라이트","videoId":"wbv5bUErdX0","complete":false},{"contents":"구자철 세계최초 두부 트래핑 도전 l 슛포러브 Shoot for Love","videoId":"1z9rGJue4pQ","complete":false},{"contents":"고려청자를 트래핑 할수 있을까요?? 구자철 선수가 직접 도전에 나서보았습니다 l 슛포러브 Shoot for Love","videoId":"Fbn85Ghgclg","complete":false},{"contents":"우리가 원했던 경기력 !!! 손흥민 멀티골, 기성용 탈압박 ● 대한민국 vs 콜롬비아 ● 하이라이트","videoId":"9dQ02l7YlQI","complete":false},{"contents":"기성용의 후배털기 ( 손흥민, 이승우, 정우영, 황희찬, 황의조)","videoId":"lHIZJ58UQow","complete":false}]}
...\ No newline at end of file ...\ No newline at end of file
1 +{"list":[{"contents":"우리가 원했던 경기력 !!! 손흥민 멀티골, 기성용 탈압박 ● 대한민국 vs 콜롬비아 ● 하이라이트","videoId":"9dQ02l7YlQI","complete":false},{"contents":"손흥민 슛팅 막는 일반인 골키퍼 시점ㅋㅋㅋㅋ (진짜 맞을 것 같음ㄷㄷㄷ) l #우리흥직캠","videoId":"yA7O_3sUhAY","complete":true},{"contents":"멕시코전 앞두고 손흥민과 치차리토를 만난 박지성. 긴 대화가 진짜 필요없는 듯 l 후방빌드업 in 러시아 월드컵 l 슛포러브 Shoot for Love","videoId":"GfHfuVOO37Q","complete":false}]}
...\ No newline at end of file ...\ No newline at end of file
......
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 - <title><%= title %></title> 4 + <meta charset="utf-8">
5 + <title>나만의 YOUTUBE 리스트</title>
5 <link rel="stylesheet" href="/stylesheets/style.css" /> 6 <link rel="stylesheet" href="/stylesheets/style.css" />
6 <link rel="stylesheet" href="/bootstrap.min.css" /> 7 <link rel="stylesheet" href="/bootstrap.min.css" />
8 + <meta name="description" content="The Overflowing church website's main page" />
9 + <meta name="author" content="unikys@gmail.com" />
10 + <style>
11 + #topMenu {
12 + height: 30px;
13 + width: 1700px;
14 + }
15 + #topMenu ul li {
16 + list-style: none;
17 + color: white;
18 + background-color: #2d2d2d;
19 + float: left;
20 + line-height: 30px;
21 + vertical-align: middle;
22 + text-align: center;
23 + }
24 + #topMenu .menuLink {
25 + text-decoration:none;
26 + color: white;
27 + display: block;
28 + width: 150px;
29 + font-size: 12px;
30 + font-weight: bold;
31 + font-family: "Trebuchet MS";
32 + }
33 + #topMenu .menuLink:hover {
34 + color: red;
35 + background-color: #4d4d4d;
36 + }
37 + </style>
7 </head> 38 </head>
8 <body> 39 <body>
9 - <h1><%= title %></h1> 40 + <nav id="topMenu" >
41 + <ul class="nav navbar-nav">
42 + <a class="menuLink" href="https://www.youtube.com/" target = "_blank"><img src = "http://tech.kobeta.com/wp-content/uploads/2018/08/2-1.jpg" width = 150></a>
43 + </ul>
44 + <ul class="nav navbar-nav navbar-right">
45 + <li><a class="menuLink" href="/">로그아웃</a></li>
46 + </ul>
47 + </nav>
48 + <h1>나만의 YOUTUBE 리스트</h1>
10 <form class="form-inline"> <!-- 새로운 ToDo 항목 추가 --> 49 <form class="form-inline"> <!-- 새로운 ToDo 항목 추가 -->
11 <div class="form-group"> 50 <div class="form-group">
12 <input type="text" class="form-control" id="new_todo" placeholder="유튜브명"> 51 <input type="text" class="form-control" id="new_todo" placeholder="유튜브명">
......
...@@ -17,8 +17,43 @@ ...@@ -17,8 +17,43 @@
17 <!-- Bootstrap CSS --> 17 <!-- Bootstrap CSS -->
18 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> 18 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
19 <title>로그인</title> 19 <title>로그인</title>
20 + <meta name="description" content="The Overflowing church website's main page" />
21 +<meta name="author" content="unikys@gmail.com" />
22 + <style>
23 + #topMenu {
24 + height: 30px;
25 + width: 1700px;
26 + }
27 + #topMenu ul li {
28 + list-style: none;
29 + color: white;
30 + background-color: #2d2d2d;
31 + float: left;
32 + line-height: 30px;
33 + vertical-align: middle;
34 + text-align: center;
35 + }
36 + #topMenu .menuLink {
37 + text-decoration:none;
38 + color: white;
39 + display: block;
40 + width: 150px;
41 + font-size: 12px;
42 + font-weight: bold;
43 + font-family: "Trebuchet MS";
44 + }
45 + #topMenu .menuLink:hover {
46 + color: red;
47 + background-color: #4d4d4d;
48 + }
49 + </style>
20 </head> 50 </head>
21 <body> 51 <body>
52 + <nav id="topMenu" >
53 + <ul class="nav navbar-nav">
54 + <a class="menuLink" href="https://www.youtube.com/" target = "_blank"><img src = "http://tech.kobeta.com/wp-content/uploads/2018/08/2-1.jpg" width = 150></a>
55 + </ul>
56 + </nav>
22 <main class="login-form"> 57 <main class="login-form">
23 <div class="cotainer"> 58 <div class="cotainer">
24 <div class="row justify-content-center"> 59 <div class="row justify-content-center">
......
...@@ -6,14 +6,52 @@ ...@@ -6,14 +6,52 @@
6 <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> 6 <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
7 <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> 7 <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
8 <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> 8 <script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
9 -<!------ Include the above in your HEAD tag ----------> 9 +<meta name="description" content="The Overflowing church website's main page" />
10 +<meta name="author" content="unikys@gmail.com" />
11 + <style>
12 + #topMenu {
13 + height: 30px;
14 + width: 1700px;
15 + }
16 + #topMenu ul li {
17 + list-style: none;
18 + color: white;
19 + background-color: #2d2d2d;
20 + float: left;
21 + line-height: 30px;
22 + vertical-align: middle;
23 + text-align: center;
24 + }
25 + #topMenu .menuLink {
26 + text-decoration:none;
27 + color: white;
28 + display: block;
29 + width: 150px;
30 + font-size: 12px;
31 + font-weight: bold;
32 + font-family: "Trebuchet MS";
33 + }
34 + #topMenu .menuLink:hover {
35 + color: red;
36 + background-color: #4d4d4d;
37 + }
38 + </style>
10 <title>회원가입 페이지</title> 39 <title>회원가입 페이지</title>
11 </head> 40 </head>
12 <form class="form-horizontal"> 41 <form class="form-horizontal">
13 <fieldset> 42 <fieldset>
43 + <legend>
44 + <nav id="topMenu" >
45 + <ul class="nav navbar-nav">
46 + <a class="menuLink" href="https://www.youtube.com/" target = "_blank"><img src = "http://tech.kobeta.com/wp-content/uploads/2018/08/2-1.jpg" width = 150></a>
47 + </ul>
48 + <ul class="nav navbar-nav navbar-right">
49 + <li><a class="menuLink" href="/">뒤로가기</a></li>
50 + </ul>
51 + </nav>
52 + </legend>
14 53
15 <!-- Form Name --> 54 <!-- Form Name -->
16 -<legend>새로운 사용자 등록</legend>
17 55
18 <!-- Text input--> 56 <!-- Text input-->
19 <div class="form-group"> 57 <div class="form-group">
......