지창언

routes update

......@@ -7,6 +7,9 @@ var bodyParser = require('body-parser')
var expressErrorHandler = require('express-error-handler');
var indexRouter = require('./routes/index')
var loginRouter = require('./routes/login')
var sign_upRouter = require('./routes/sign_up')
var lpgRouter = require('./routes/lpg')
var weatherRouter = require('./routes/weather')
var app = express();
// get port
......@@ -25,9 +28,11 @@ app.use(express.static(path.join(__dirname, 'public')));
//
app.use('/login',loginRouter); // login page route
app.use('/weather',weatherRouter)
app.use('/lpg',lpgRouter)
app.use('/signup',sign_upRouter); // sign up page route
app.use('/', indexRouter); // main page route
//모든 router 처리가 끝난 후 404 오류 페이지 처리
var errorHandler = expressErrorHandler({
static: {
......
var express = require('express')
var router = express.Router();
var router = express.Router()
/*
//라우터 객체 참조
......
var express = require('express')
var router = express.Router()
router.get('/',function(req,res){
res.render('lpg.html')
})
module.exports = router
\ No newline at end of file
var express = require('express')
var router = express.Router()
router.get('/',function(req,res){
res.render('sign_up.html')
})
module.exports = router
\ No newline at end of file
var express = require('express')
var router = express.Router()
router.get('/',function(req,res){
res.render('weather.html')
})
module.exports = router
\ No newline at end of file
......@@ -81,7 +81,7 @@
</div>
<div class = "button">
<span><a href="/login" style = "color: #0A9696;">Log in</a></span>
<span><a href="https://www.google.co.kr" style = "color: #0A9696;">Sign up</a></span>
<span><a href="/sign_up" style = "color: #0A9696;">Sign up</a></span>
</div>
</div>
......@@ -96,9 +96,9 @@
</div>
<div class="icon">
<span style="color:white; font-size:20px;"><b>날씨</b></span>
<span style="color:white; font-size:20px;"><b>메뉴</b></span>
<span style="color:white; font-size:20px;"><b>LPG</b></span>
<span style="color:white; font-size:20px;"><a href = "/weather"><b>날씨</b></a></span>
<span style="color:white; font-size:20px;"><a href = "/menu"><b>메뉴</b></a></span>
<span style="color:white; font-size:20px;"><a href = "lpg"><b>LPG</b></a></span>
</div>
</div>
</div>
......