Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김대철
/
CafeRecommend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최정민
2021-06-08 04:17:12 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
50e3d29090d6a0aafbae2b7b1d4c743491c287db
50e3d290
1 parent
b9ee9eee
FIX : 잘못된 코드로 인한 오류수정및 전체적인 디자인 수정
-
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
31 deletions
app.js
routes/index.js
sessions/5R7ZzlStuU3x4Yj-_WgSS_mIG-NH0MVs.json
views/index.ejs
views/login.ejs
views/map.ejs
views/review.ejs
app.js
View file @
50e3d29
...
...
@@ -5,7 +5,6 @@ var cookieParser = require("cookie-parser");
var
logger
=
require
(
"morgan"
);
var
indexRouter
=
require
(
"./routes/index"
);
var
usersRouter
=
require
(
"./routes/users"
);
var
app
=
express
();
...
...
@@ -20,7 +19,6 @@ app.use(cookieParser());
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
"public"
)));
app
.
use
(
"/"
,
indexRouter
);
app
.
use
(
"/users"
,
usersRouter
);
// catch 404 and forward to error handler
app
.
use
(
function
(
req
,
res
,
next
)
{
...
...
routes/index.js
View file @
50e3d29
...
...
@@ -23,7 +23,7 @@ router.use(
);
var
connection
=
mysql
.
createConnection
({
host
:
"IP주소 입력 (localhost 또는 서버 주소)"
,
host
:
"IP주소 입력 (localhost 또는
AWS
서버 주소)"
,
user
:
"계정 입력"
,
password
:
"암호 입력"
,
database
:
"스키마이름 입력"
,
...
...
@@ -76,7 +76,7 @@ router.get("/login", checkAuthenticated, (req, res) => {
req
.
session
.
user
.
nickname
=
row
[
0
].
NICKNAME
;
req
.
session
.
user
.
age
=
row
[
0
].
AGE
;
req
.
session
.
user
.
gender
=
row
[
0
].
GENDER
;
res
.
re
direct
(
"/map"
);
res
.
re
nder
(
"map"
,
{
user
:
req
.
session
.
user
}
);
}
else
{
return
res
.
render
(
"login"
,
{
user
:
req
.
session
.
user
,
message
:
"none"
});
}
...
...
@@ -171,7 +171,7 @@ router.post("/login", (req, res) => {
}
});
res
.
re
direct
(
"/map"
);
res
.
re
nder
(
"map"
,
{
user
:
req
.
session
.
user
}
);
}
});
});
...
...
sessions/5R7ZzlStuU3x4Yj-_WgSS_mIG-NH0MVs.json
0 → 100644
View file @
50e3d29
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1623093255424
,
"user"
:{
"email"
:
"cjm104174@gmail.com"
,
"picture"
:
"https://lh3.googleusercontent.com/a-/AOh14Gh3nytGsPbviGhkznR8HIwrL6o7xBIoFL08nIeU=s96-c"
,
"nickname"
:
"Mayf"
,
"age"
:
25
,
"gender"
:
"male"
}}
\ No newline at end of file
views/index.ejs
View file @
50e3d29
...
...
@@ -61,18 +61,7 @@
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<a
class=
"navbar-brand"
href=
"/"
><strong>
Home
</strong></a>
<ul
class=
"navbar-nav mr-auto mt-2 mt-lg-0"
>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
style=
"color: #ffffff"
href=
"/"
onclick=
"signOut();"
>
Logout
<span
class=
"sr-only"
>
(current)
</span></a
>
</li>
</ul>
<a
class=
"navbar-brand"
href=
"/"
style=
"margin-left: 10px"
><strong>
Home
</strong></a>
</div>
</nav>
<br
/><br
/>
...
...
@@ -93,17 +82,11 @@
button
</div>
<br
/><br
/>
</div>
</head>
<body>
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarSupportedContent"
aria-controls=
"navbarSupportedContent"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<a
class=
"navbar-brand"
href=
"/"
style=
"margin-left: 10px"
><strong>
Home
</strong></a>
</div>
</body>
<script
src=
"https://code.jquery.com/jquery-3.1.1.min.js"
></script>
...
...
views/login.ejs
View file @
50e3d29
...
...
@@ -53,7 +53,7 @@
style=
"color: #ffffff"
href=
"/"
onclick=
"signOut();"
>
Logout
<span
class=
"sr-only"
>
(current)
</span></a
>
Logout
<span
class=
"sr-only"
></span></a
>
</li>
</ul>
...
...
views/map.ejs
View file @
50e3d29
...
...
@@ -124,24 +124,34 @@
data-toggle=
"modal"
data-target=
"#profile"
>
<
%=user.nickname%>'s Profile
<span
class=
"sr-only"
>
(current)
</span
></span
></a
>
</li>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
style=
"color: #ffffff"
href=
"#"
onclick=
"recommend();"
>
recommend
<span
class=
"sr-only"
></span></a
>
</li>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
style=
"color: #ffffff"
href=
"/"
onclick=
"signOut();"
>
Logout
<span
class=
"sr-only"
>
(current)
</span></a
>
Logout
<span
class=
"sr-only"
></span></a
>
</li>
</ul>
</div>
</nav>
<div
class=
"pricing-header px-3 py-1 pt-md-3 pb-md-1 mx-auto text-center"
>
<h
3
class=
"display-6 font-weight-bold"
>
Map
</h3
>
<h
1
class=
"font-weight-bold"
>
Map
</h1
>
</div>
<section
id=
"carousel-3"
class=
"text-center"
>
<div
class=
"row"
>
...
...
views/review.ejs
View file @
50e3d29
...
...
@@ -51,6 +51,17 @@
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<a
class=
"navbar-brand"
href=
"/"
style=
"margin-left: 10px"
><strong>
Home
</strong></a>
<ul
class=
"navbar-nav mr-auto mt-2 mt-lg-0"
>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
style=
"color: #ffffff"
href=
"/map"
>
Map
<span
class=
"sr-only"
></span></a
>
</li>
</ul>
</div>
</nav>
...
...
@@ -63,9 +74,9 @@
<div
class=
"row"
>
<div
class=
"col-2"
></div>
<div
class=
"col-8"
>
<hr
class=
"my-
4
"
style=
"background-color: white"
>
<hr
class=
"my-
2
"
style=
"background-color: white"
>
<form
action=
"/review"
method=
"post"
>
<hr
class=
"my-3"
style=
"background-color: white"
>
<label
for=
"cafeId"
class=
"form-label"
>
카페ID
</label>
<select
class=
"form-select form-select-lg"
id=
"cafeId"
name=
"cafeId"
required
>
<option
value=
"<%=cafeId%>"
selected
>
<
%=cafeId%>
</option>
...
...
Please
register
or
login
to post a comment