Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이유제
/
CultureGallery
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
송효섭
2020-12-04 23:32:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ded4b699afcaa0f245251cffea0f81447020227
0ded4b69
1 parent
0c4b0a67
Backend router 설정
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
2 deletions
routes/index.js
routes/login.js
routes/main.js
routes/send.js
routes/index.js
View file @
0ded4b6
...
...
@@ -2,8 +2,11 @@ var express = require('express');
var
router
=
express
.
Router
();
/* GET home page. */
router
.
get
(
'/'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'
index'
,
{
title
:
'Express
'
});
router
.
get
(
'/'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'
/public/html/main'
,
{
title
:
'My Gallery
'
});
});
router
.
get
(
'/login'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'index'
,
{
title
:
'Express'
});
})
module
.
exports
=
router
;
...
...
routes/login.js
0 → 100644
View file @
0ded4b6
var
express
=
require
(
'express'
);
var
router
=
express
.
Router
();
var
fs
=
require
(
'fs'
);
//로그인 페이지에서 실행됨 : title 할당하고 login.html 띄워줌.
router
.
get
(
'/login'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'login.html'
,
{
title
:
'Login2'
});
var
url
=
request
.
url
;
if
(
url
==
'/'
)
{
url
=
'send.html'
;
}
if
(
url
==
'/loginmainpage'
)
{
url
=
'loginmainpage.html'
;
}
response
.
writeHead
(
200
);
response
.
end
(
fs
.
readFileSync
(
__dirname
+
url
));
console
.
log
(
'로그인 페이지 접속 성공'
);
});
module
.
exports
=
router
;
routes/main.js
0 → 100644
View file @
0ded4b6
var
express
=
require
(
'express'
);
var
router
=
express
.
Router
();
//루트 페이지 (메인페이지)에서 실행됨 : title 할당하고 main.html 띄워줌.
router
.
get
(
'/'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'main.html'
,
{
title
:
'Culture Gallery'
});
console
.
log
(
'main 접속 성공'
);
});
/* GET home page. */
router
.
get
(
'/login'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'login.html'
,
{
title
:
'Login1'
});
console
.
log
(
'로그인 페이지 접속 성공'
);
});
module
.
exports
=
router
;
\ No newline at end of file
routes/send.js
0 → 100644
View file @
0ded4b6
function
sendLink
(){
Kakao
.
init
(
'0678e32dab56db1c52ac63ab4ccb7663'
)
Kakao
.
Link
.
sendDefault
({
objectType
:
'feed'
,
content
:{
title
:
"관심있는 공연 정보"
,
description
:
'주소-> http://naver.com'
,
imageUrl
:
'http://k.kakaocdn.net/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png'
,
link
:{
mobileWebUrl
:
'http://naver.com'
,
webUrl
:
'http://naver.com'
,
},
},
buttons
:
[
{
title
:
'웹으로 보기'
,
link
:
{
mobileWebUrl
:
'http://naver.com'
,
webUrl
:
'http://naver.com'
,
},
},
{
title
:
'웹으로 보기'
,
link
:
{
mobileWebUrl
:
'http://naver.com'
,
webUrl
:
'http://naver.com'
,
},
},
],
})
};
\ No newline at end of file
Please
register
or
login
to post a comment