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-05 23:34:40 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7c73955e239840664c4bc6d943e4543832380cab
7c73955e
1 parent
56b98cab
Backend : map 라우터 수정
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
app.js
routes/index.js
app.js
View file @
7c73955
...
...
@@ -13,10 +13,8 @@ app.set('views', path.join(__dirname, 'views'));
app
.
set
(
'view engine'
,
'ejs'
);
app
.
engine
(
'html'
,
require
(
'ejs'
).
renderFile
);
//각각의 요청에서 router 호출해서 page를 전환함.
//각각의 요청에서
index.js에 등록된
router 호출해서 page를 전환함.
app
.
use
(
'/'
,
mainRouter
);
app
.
use
(
'/login'
,
mainRouter
);
//css, image 등 정적 파일을 public에서 불러옴 -> html과 연결함
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'public'
)));
...
...
routes/index.js
View file @
7c73955
...
...
@@ -13,13 +13,20 @@ router.get('/login', function (req, res, next) {
console
.
log
(
'로그인 페이지 접속 성공'
);
});
// router.get('/login/:id', function (req, res) {
// var id = req.params.id;
// console.log('id 할당 접속 성공');
// });
/* GET home page. */
router
.
get
(
'/maptest'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'maptest.html'
,
{
title
:
'카카오맵 호출'
});
console
.
log
(
'카카오맵 페이지 접속 성공'
);
});
router
.
get
(
'/send'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'send.html'
,
{
title
:
'Send message'
});
console
.
log
(
'카카오톡 공유 메시지 접속 성공'
);
})
// router.get('/login/:id', function (req, res) {
// var id = req.params.id;
// console.log('id 할당 접속 성공');
// });
module
.
exports
=
router
;
\ No newline at end of file
...
...
Please
register
or
login
to post a comment