조국현

Update index.js, index.ejs, index.css

1 +{
2 + // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
3 + // 기존 특성에 대한 설명을 보려면 가리킵니다.
4 + // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
5 + "version": "0.2.0",
6 + "configurations": [
7 + {
8 + "type": "pwa-chrome",
9 + "request": "launch",
10 + "name": "Launch Chrome against localhost",
11 + "url": "http://localhost:8080",
12 + "webRoot": "${workspaceFolder}"
13 + }
14 + ]
15 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -11,6 +11,7 @@ const path=require('path') ...@@ -11,6 +11,7 @@ const path=require('path')
11 11
12 app.set('views', __dirname + '/public') 12 app.set('views', __dirname + '/public')
13 app.set('view engine', 'ejs') 13 app.set('view engine', 'ejs')
14 +app.use(express.static(__dirname+'/public'))
14 15
15 app.use(bodyParser.urlencoded({extended:false})) 16 app.use(bodyParser.urlencoded({extended:false}))
16 app.use(bodyParser.json()) 17 app.use(bodyParser.json())
......
1 +* {
2 + box-sizing: border-box;
3 + font-family: 'Noto Sans KR', Sans-serif;
4 +}
5 +body {
6 + margin: 0;
7 + background-color: gray;
8 +}
9 +.container {
10 + position: absolute;
11 + width: 400px;
12 + height: 400px;
13 + background-color: gray;
14 + text-align: center;
15 + margin-left: -200px;
16 + margin-top: -200px;
17 + left: 50%;
18 + top: 50%;
19 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 + <link rel="stylesheet" type="text/css" href="/css/index.css"/>
6 <title><%= title %></title> 7 <title><%= title %></title>
7 </head> 8 </head>
8 <body> 9 <body>
9 - <h1>로그인하기</h1> 10 + <div class="container">
11 + <h1>Login</h1>
10 <form method="POST" action="/"> 12 <form method="POST" action="/">
11 <label for="userId">아이디</label> 13 <label for="userId">아이디</label>
12 <input type="text" id="userId" name="userId"><br> 14 <input type="text" id="userId" name="userId"><br>
...@@ -14,5 +16,6 @@ ...@@ -14,5 +16,6 @@
14 <input type="password" id="password" name="password"><br> 16 <input type="password" id="password" name="password"><br>
15 <button>로그인</button> 17 <button>로그인</button>
16 </form> 18 </form>
19 + </div>
17 </body> 20 </body>
18 </html> 21 </html>
...\ No newline at end of file ...\ No newline at end of file
......