index.js 999 Bytes
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: 'Login' });
  console.log('로그인 페이지 접속 성공');
});

/* 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;