Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김민규
/
rest_stop_list
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
지창언
2022-05-12 17:31:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9f5ddb3952537319fa71d6c4f808adab5e890aea
9f5ddb39
1 parent
c263a4d2
routes update
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
6 deletions
app/app.js
app/routes/login.js
app/routes/lpg.js
app/routes/sign_up.js
app/routes/weather.js
app/views/mainpage.html
app/app.js
View file @
9f5ddb3
...
...
@@ -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
:
{
...
...
app/routes/login.js
View file @
9f5ddb3
var
express
=
require
(
'express'
)
var
router
=
express
.
Router
()
;
var
router
=
express
.
Router
()
/*
//라우터 객체 참조
...
...
app/routes/lpg.js
0 → 100644
View file @
9f5ddb3
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
app/routes/sign_up.js
0 → 100644
View file @
9f5ddb3
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
app/routes/weather.js
0 → 100644
View file @
9f5ddb3
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
app/views/mainpage.html
View file @
9f5ddb3
...
...
@@ -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>
...
...
Please
register
or
login
to post a comment