Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최시원
/
Singer-Composer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Mukho
2021-11-16 18:55:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5425b2b587fd5845aa1a29954dbd2ef4b2b8ba12
5425b2b5
1 parent
76cce0c6
Update href
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
16 deletions
public/login.html
public/main.html
readme.md
router/main/main.js
views/list.ejs
views/login.ejs
views/main.ejs
views/register.ejs
public/login.html
View file @
5425b2b
...
...
@@ -19,9 +19,9 @@
<!-- Navigation-->
<nav
class=
"navbar navbar-light bg-light static-top"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"
http://localhost:3000/
"
>
묵호의 놀이터
</a>
<a
class=
"navbar-brand"
href=
"
/main
"
>
묵호의 놀이터
</a>
<div
class=
"user"
>
<a
class=
"btn btn-primary"
href=
"
http://localhost:3000
/register"
>
회원가입
</a>
<a
class=
"btn btn-primary"
href=
"/register"
>
회원가입
</a>
</div>
</div>
</nav>
...
...
public/main.html
View file @
5425b2b
...
...
@@ -19,10 +19,10 @@
<!-- Navigation-->
<nav
class=
"navbar navbar-light bg-light static-top"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"
http://localhost:3000/
"
>
묵호의 놀이터
</a>
<a
class=
"navbar-brand"
href=
"
/main
"
>
묵호의 놀이터
</a>
<div
class=
"user"
>
<a
class=
"btn btn-primary"
href=
"
http://localhost:3000
/login"
>
로그인
</a>
<a
class=
"btn btn-primary"
href=
"
http://localhost:3000
/register"
>
회원가입
</a>
<a
class=
"btn btn-primary"
href=
"/login"
>
로그인
</a>
<a
class=
"btn btn-primary"
href=
"/register"
>
회원가입
</a>
</div>
</div>
</nav>
...
...
readme.md
View file @
5425b2b
...
...
@@ -24,4 +24,5 @@ DB 구조(*ID, password, type) -> 형식에 맞게 추가<br>
LF 오류시 git config --global core.autocrlf true 입력
<br><br>
최종 수정: 2021-11-16 14:03
\ No newline at end of file
최종 수정: 2021-11-16 18:54
<br>
최종 수정 내용: 경로 지정 수정
\ No newline at end of file
...
...
router/main/main.js
View file @
5425b2b
...
...
@@ -5,10 +5,12 @@ var path = require('path') // 상대경로
// main page는 login이 된 상태(세션정보가 있을때만) 접근이 가능하게 하자 -> info에 구현해놓음.
router
.
get
(
'/'
,
function
(
req
,
res
){
console
.
log
(
req
.
user
,
'유저가 작업 중입니다.'
)
var
id
=
req
.
user
;
if
(
!
id
)
res
.
sendFile
(
path
.
join
(
__dirname
,
"../../public/main.html"
))
if
(
id
)
res
.
render
(
'main.ejs'
,
{
'ID'
:
id
});
if
(
id
){
console
.
log
(
req
.
user
,
'유저가 작업 중입니다.'
)
res
.
render
(
'main.ejs'
,
{
'ID'
:
id
});
}
});
module
.
exports
=
router
;
\ No newline at end of file
...
...
views/list.ejs
View file @
5425b2b
...
...
@@ -10,10 +10,10 @@
<!-- Navigation-->
<nav
class=
"navbar navbar-light bg-light static-top"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"
http://localhost:3000
/main"
>
묵호의 놀이터
</a>
<a
class=
"navbar-brand"
href=
"/main"
>
묵호의 놀이터
</a>
<div
class=
"user"
>
<a>
<
%= ID %> 님 안녕하세요
</section></a>
<a
class=
"btn btn-primary"
href=
"
http://localhost:3000
/logout"
>
로그아웃
</a>
<a
class=
"btn btn-primary"
href=
"/logout"
>
로그아웃
</a>
</div>
</div>
</nav>
...
...
views/login.ejs
View file @
5425b2b
...
...
@@ -19,9 +19,9 @@
<!-- Navigation-->
<nav
class=
"navbar navbar-light bg-light static-top"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"
http://localhost:3000/
"
>
묵호의 놀이터
</a>
<a
class=
"navbar-brand"
href=
"
/main
"
>
묵호의 놀이터
</a>
<div
class=
"user"
>
<a
class=
"btn btn-primary"
href=
"
http://localhost:3000
/register"
>
회원가입
</a>
<a
class=
"btn btn-primary"
href=
"/register"
>
회원가입
</a>
</div>
</div>
</nav>
...
...
views/main.ejs
View file @
5425b2b
...
...
@@ -19,10 +19,10 @@
<!-- Navigation-->
<nav
class=
"navbar navbar-light bg-light static-top"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"
http://localhost:3000
/main"
>
묵호의 놀이터
</a>
<a
class=
"navbar-brand"
href=
"/main"
>
묵호의 놀이터
</a>
<div
class=
"user"
>
<a>
<
%= ID %> 님 안녕하세요
</a>
<a
class=
"btn btn-primary"
href=
"
http://localhost:3000
/logout"
>
로그아웃
</a>
<a
class=
"btn btn-primary"
href=
"/logout"
>
로그아웃
</a>
</div>
</div>
</nav>
...
...
views/register.ejs
View file @
5425b2b
...
...
@@ -19,9 +19,9 @@
<!-- Navigation-->
<nav
class=
"navbar navbar-light bg-light static-top"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"
http://localhost:3000/
"
>
묵호의 놀이터
</a>
<a
class=
"navbar-brand"
href=
"
/main
"
>
묵호의 놀이터
</a>
<div
class=
"user"
>
<a
class=
"btn btn-primary"
href=
"
http://localhost:3000
/login"
>
로그인
</a>
<a
class=
"btn btn-primary"
href=
"/login"
>
로그인
</a>
</div>
</div>
</nav>
...
...
Please
register
or
login
to post a comment