Toggle navigation
Toggle navigation
This project
Loading...
Sign in
zuzitsu
/
UR_Village
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
Suyeon Jung
2020-11-29 15:24:15 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a4c39bbc08c7054e9101acb0f70bbbe0cf2ea09a
a4c39bbc
2 parents
562c7884
4cd93adb
Merge branch 'test' into 'master'
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
9 deletions
app.js
package.json
routes/index.js
routes/select.js
static/logo.png
views/index.pug
views/select.pug
app.js
View file @
a4c39bb
...
...
@@ -6,9 +6,9 @@ var logger = require('morgan');
var
indexRouter
=
require
(
'./routes/index'
);
var
usersRouter
=
require
(
'./routes/users'
);
var
selectRouter
=
require
(
'./routes/select'
)
var
app
=
express
();
var
bodyParser
=
require
(
'body-parser'
);
// view engine setup
app
.
set
(
'views'
,
path
.
join
(
__dirname
,
'views'
));
app
.
set
(
'view engine'
,
'pug'
);
...
...
@@ -17,10 +17,11 @@ app.use(logger('dev'));
app
.
use
(
express
.
json
());
app
.
use
(
express
.
urlencoded
({
extended
:
false
}));
app
.
use
(
cookieParser
());
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'public'
)));
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'/static'
)));
//정적파일 위치
app
.
use
(
'/'
,
indexRouter
);
app
.
use
(
'/users'
,
usersRouter
);
app
.
use
(
'/select'
,
selectRouter
)
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
// catch 404 and forward to error handler
app
.
use
(
function
(
req
,
res
,
next
)
{
...
...
@@ -38,4 +39,5 @@ app.use(function(err, req, res, next) {
res
.
render
(
'error'
);
});
module
.
exports
=
app
;
\ No newline at end of file
...
...
package.json
View file @
a4c39bb
routes/index.js
View file @
a4c39bb
...
...
@@ -3,6 +3,6 @@ var router = express.Router();
/* GET home page. */
router
.
get
(
'/'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'index'
,
{
title
:
'Express'
}
);
res
.
render
(
'index'
);
});
module
.
exports
=
router
;
\ No newline at end of file
...
...
routes/select.js
0 → 100644
View file @
a4c39bb
var
express
=
require
(
'express'
);
var
router
=
express
.
Router
();
/* GET home page. */
router
.
post
(
'/'
,
function
(
req
,
res
)
{
res
.
render
(
'select'
,
{
'si'
:
req
.
body
.
si
,
'ku'
:
req
.
body
.
ku
});
});
module
.
exports
=
router
;
\ No newline at end of file
static/logo.png
0 → 100644
View file @
a4c39bb
14.7 KB
views/index.pug
View file @
a4c39bb
extends layout
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
img.image(src='/logo.png')
form(action='/select' method='post' id='location')
select(name="si")
option(value="select") 시
option(value="수원시") 수원시
option(value="성남시") 성남시
option(value="의정부시") 의정부시
option(value="안양시") 안양시
option(value="부천시") 부천시
option(value="광명시") 광명시
option(value="평택시") 평택시
option(value="동두천시") 동두천시
option(value="안산시") 안산시
option(value="고양시") 고양시
option(value="과천시") 과천시
option(value="구리시") 구리시
option(value="남양주시") 남양주시
option(value="오산시") 오산시
option(value="시흥시") 시흥시
option(value="군포시") 군포시
option(value="의왕시") 의왕시
option(value="하남시") 하남시
option(value="용인시") 용인시
option(value="파주시") 파주시
option(value="이천시") 이천시
option(value="안성시") 안성시
option(value="김포시") 김포시
option(value="화성시") 화성시
option(value="광주시") 광주시
option(value="양주시") 양주시
option(value="포천시") 포천시
option(value="여주시") 여주시
select(name="ku")
option(value="select") 구
option(value="장안구") 장안구
option(value="권선구") 권선구
option(value="팔달구") 팔달구
option(value="영통구") 영통구
option(value="수정구") 수정구
option(value="중원구") 중원구
option(value="분당구") 분당구
option(value="만안구") 만안구
option(value="동안구") 동안구
option(value="원미구") 원미구
option(value="소사구") 소사구
option(value="오정구") 오정구
option(value="상록구") 상록구
option(value="단원구") 단원구
option(value="덕양구") 덕양구
option(value="일산동구") 일산동구
option(value="일산서구") 일산서구
option(value="처인구") 처인구
option(value="기흥구") 기흥구
option(value="수지구") 수지구
input(type ='submit')
\ No newline at end of file
block content
h1= title
p Welcome to #{title}
...
...
views/select.pug
0 → 100644
View file @
a4c39bb
//- doctype html
html
head
if location =="n"
button k
body
block content
h1 #{si}
h1 #{ku}
Please
register
or
login
to post a comment