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
dckat
2021-05-19 16:15:50 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d94cbedc17d561901e4ab3ddc250eb9f9307bb2b
d94cbedc
1 parent
5f056929
지도에 카페 마커 표시하기
feat, test: map.ejs 카페 테스트 데이터로 15개 지도에 띄우고 상세정보 표현
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
661 additions
and
411 deletions
package-lock.json
routes/index.js
sessions/VvsS_GKME1Xfd8FpHFgJlt7bWhEaQj5k.json
sessions/W_6Y5JZDcdIB7Dox4_6wie-sInWOdJS4.json
sessions/Z-mnYpo3ju8q-ID-yPumLPu1bxl3vEtf.json
sessions/kVae1hrGwFmV4Ljkk8tHhoTai-xCh1fM.json
views/map.ejs
package-lock.json
View file @
d94cbed
...
...
@@ -1151,16 +1151,16 @@
"resolved"
:
"https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz"
,
"integrity"
:
"sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw=="
},
"isstream"
:
{
"version"
:
"0.1.2"
,
"resolved"
:
"https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
,
"integrity"
:
"sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"isarray"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
,
"integrity"
:
"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isstream"
:
{
"version"
:
"0.1.2"
,
"resolved"
:
"https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
,
"integrity"
:
"sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"jake"
:
{
"version"
:
"10.8.2"
,
"resolved"
:
"https://registry.npmjs.org/jake/-/jake-10.8.2.tgz"
,
...
...
@@ -1799,6 +1799,11 @@
"resolved"
:
"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz"
,
"integrity"
:
"sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
},
"sqlstring"
:
{
"version"
:
"2.3.1"
,
"resolved"
:
"https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz"
,
"integrity"
:
"sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A="
},
"sshpk"
:
{
"version"
:
"1.16.1"
,
"resolved"
:
"https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz"
,
...
...
@@ -1813,335 +1818,330 @@
"jsbn"
:
"~0.1.0"
,
"safer-buffer"
:
"^2.0.2"
,
"tweetnacl"
:
"~0.14.0"
}
},
"statuses"
:
{
"version"
:
"1.4.0"
,
"resolved"
:
"https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz"
,
"integrity"
:
"sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
},
"string-width"
:
{
"version"
:
"4.2.2"
,
"resolved"
:
"https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz"
,
"integrity"
:
"sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA=="
,
"requires"
:
{
"emoji-regex"
:
"^8.0.0"
,
"is-fullwidth-code-point"
:
"^3.0.0"
,
"strip-ansi"
:
"^6.0.0"
},
"sqlstring"
:
{
"version"
:
"2.3.1"
,
"resolved"
:
"https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz"
,
"integrity"
:
"sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A="
},
"statuses"
:
{
"version"
:
"1.4.0"
,
"resolved"
:
"https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz"
,
"integrity"
:
"sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
},
"string-width"
:
{
"version"
:
"4.2.2"
,
"resolved"
:
"https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz"
,
"integrity"
:
"sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA=="
,
"requires"
:
{
"emoji-regex"
:
"^8.0.0"
,
"is-fullwidth-code-point"
:
"^3.0.0"
,
"strip-ansi"
:
"^6.0.0"
"dependencies"
:
{
"ansi-regex"
:
{
"version"
:
"5.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz"
,
"integrity"
:
"sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
},
"emoji-regex"
:
{
"version"
:
"8.0.0"
,
"resolved"
:
"https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz"
,
"integrity"
:
"sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"dependencies"
:
{
"ansi-regex"
:
{
"version"
:
"5.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz"
,
"integrity"
:
"sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
},
"emoji-regex"
:
{
"version"
:
"8.0.0"
,
"resolved"
:
"https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz"
,
"integrity"
:
"sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"is-fullwidth-code-point"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"
,
"integrity"
:
"sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"strip-ansi"
:
{
"version"
:
"6.0.0"
,
"resolved"
:
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz"
,
"integrity"
:
"sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w=="
,
"requires"
:
{
"ansi-regex"
:
"^5.0.0"
}
"is-fullwidth-code-point"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"
,
"integrity"
:
"sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"strip-ansi"
:
{
"version"
:
"6.0.0"
,
"resolved"
:
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz"
,
"integrity"
:
"sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w=="
,
"requires"
:
{
"ansi-regex"
:
"^5.0.0"
}
}
}
},
"string_decoder"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz"
,
"integrity"
:
"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="
,
"requires"
:
{
"safe-buffer"
:
"~5.1.0"
}
},
"strip-ansi"
:
{
"version"
:
"5.2.0"
,
"resolved"
:
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz"
,
"integrity"
:
"sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA=="
,
"requires"
:
{
"ansi-regex"
:
"^4.1.0"
}
},
"strip-json-comments"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz"
,
"integrity"
:
"sha1-PFMZQukIwml8DsNEhYwobHygpgo="
},
"supports-color"
:
{
"version"
:
"5.5.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz"
,
"integrity"
:
"sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="
,
"requires"
:
{
"has-flag"
:
"^3.0.0"
}
},
"term-size"
:
{
"version"
:
"2.2.1"
,
"resolved"
:
"https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz"
,
"integrity"
:
"sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="
},
"to-readable-stream"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz"
,
"integrity"
:
"sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q=="
},
"to-regex-range"
:
{
"version"
:
"5.0.1"
,
"resolved"
:
"https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz"
,
"integrity"
:
"sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="
,
"requires"
:
{
"is-number"
:
"^7.0.0"
}
},
"toidentifier"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz"
,
"integrity"
:
"sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"touch"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/touch/-/touch-3.1.0.tgz"
,
"integrity"
:
"sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA=="
,
"requires"
:
{
"nopt"
:
"~1.0.10"
}
},
"tough-cookie"
:
{
"version"
:
"2.5.0"
,
"resolved"
:
"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz"
,
"integrity"
:
"sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g=="
,
"requires"
:
{
"psl"
:
"^1.1.28"
,
"punycode"
:
"^2.1.1"
}
},
"tunnel-agent"
:
{
"version"
:
"0.6.0"
,
"resolved"
:
"https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz"
,
"integrity"
:
"sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0="
,
"requires"
:
{
"safe-buffer"
:
"^5.0.1"
}
},
"tweetnacl"
:
{
"version"
:
"0.14.5"
,
"resolved"
:
"https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz"
,
"integrity"
:
"sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"type-fest"
:
{
"version"
:
"0.8.1"
,
"resolved"
:
"https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz"
,
"integrity"
:
"sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA=="
},
"type-is"
:
{
"version"
:
"1.6.18"
,
"resolved"
:
"https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz"
,
"integrity"
:
"sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g=="
,
"requires"
:
{
"media-typer"
:
"0.3.0"
,
"mime-types"
:
"~2.1.24"
}
},
"typedarray-to-buffer"
:
{
"version"
:
"3.1.5"
,
"resolved"
:
"https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz"
,
"integrity"
:
"sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q=="
,
"requires"
:
{
"is-typedarray"
:
"^1.0.0"
}
},
"uid-safe"
:
{
"version"
:
"2.1.5"
,
"resolved"
:
"https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz"
,
"integrity"
:
"sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA=="
,
"requires"
:
{
"random-bytes"
:
"~1.0.0"
}
},
"undefsafe"
:
{
"version"
:
"2.0.3"
,
"resolved"
:
"https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz"
,
"integrity"
:
"sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A=="
,
"requires"
:
{
"debug"
:
"^2.2.0"
}
},
"unique-string"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz"
,
"integrity"
:
"sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg=="
,
"requires"
:
{
"crypto-random-string"
:
"^2.0.0"
}
},
"universalify"
:
{
"version"
:
"0.1.2"
,
"resolved"
:
"https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz"
,
"integrity"
:
"sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
},
"unpipe"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
,
"integrity"
:
"sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"update-notifier"
:
{
"version"
:
"4.1.3"
,
"resolved"
:
"https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz"
,
"integrity"
:
"sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A=="
,
"requires"
:
{
"boxen"
:
"^4.2.0"
,
"chalk"
:
"^3.0.0"
,
"configstore"
:
"^5.0.1"
,
"has-yarn"
:
"^2.1.0"
,
"import-lazy"
:
"^2.1.0"
,
"is-ci"
:
"^2.0.0"
,
"is-installed-globally"
:
"^0.3.1"
,
"is-npm"
:
"^4.0.0"
,
"is-yarn-global"
:
"^0.3.0"
,
"latest-version"
:
"^5.0.0"
,
"pupa"
:
"^2.0.1"
,
"semver-diff"
:
"^3.1.1"
,
"xdg-basedir"
:
"^4.0.0"
},
"string_decoder"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz"
,
"integrity"
:
"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="
,
"requires"
:
{
"safe-buffer"
:
"~5.1.0"
}
},
"strip-ansi"
:
{
"version"
:
"5.2.0"
,
"resolved"
:
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz"
,
"integrity"
:
"sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA=="
,
"requires"
:
{
"ansi-regex"
:
"^4.1.0"
}
},
"strip-json-comments"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz"
,
"integrity"
:
"sha1-PFMZQukIwml8DsNEhYwobHygpgo="
},
"supports-color"
:
{
"version"
:
"5.5.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz"
,
"integrity"
:
"sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="
,
"requires"
:
{
"has-flag"
:
"^3.0.0"
}
},
"term-size"
:
{
"version"
:
"2.2.1"
,
"resolved"
:
"https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz"
,
"integrity"
:
"sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="
},
"to-readable-stream"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz"
,
"integrity"
:
"sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q=="
},
"to-regex-range"
:
{
"version"
:
"5.0.1"
,
"resolved"
:
"https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz"
,
"integrity"
:
"sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="
,
"requires"
:
{
"is-number"
:
"^7.0.0"
}
},
"toidentifier"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz"
,
"integrity"
:
"sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"touch"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/touch/-/touch-3.1.0.tgz"
,
"integrity"
:
"sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA=="
,
"requires"
:
{
"nopt"
:
"~1.0.10"
}
},
"tough-cookie"
:
{
"version"
:
"2.5.0"
,
"resolved"
:
"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz"
,
"integrity"
:
"sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g=="
,
"requires"
:
{
"psl"
:
"^1.1.28"
,
"punycode"
:
"^2.1.1"
}
},
"tunnel-agent"
:
{
"version"
:
"0.6.0"
,
"resolved"
:
"https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz"
,
"integrity"
:
"sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0="
,
"requires"
:
{
"safe-buffer"
:
"^5.0.1"
}
},
"tweetnacl"
:
{
"version"
:
"0.14.5"
,
"resolved"
:
"https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz"
,
"integrity"
:
"sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"type-fest"
:
{
"version"
:
"0.8.1"
,
"resolved"
:
"https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz"
,
"integrity"
:
"sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA=="
},
"type-is"
:
{
"version"
:
"1.6.18"
,
"resolved"
:
"https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz"
,
"integrity"
:
"sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g=="
,
"requires"
:
{
"media-typer"
:
"0.3.0"
,
"mime-types"
:
"~2.1.24"
}
},
"typedarray-to-buffer"
:
{
"version"
:
"3.1.5"
,
"resolved"
:
"https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz"
,
"integrity"
:
"sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q=="
,
"requires"
:
{
"is-typedarray"
:
"^1.0.0"
}
},
"uid-safe"
:
{
"version"
:
"2.1.5"
,
"resolved"
:
"https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz"
,
"integrity"
:
"sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA=="
,
"requires"
:
{
"random-bytes"
:
"~1.0.0"
}
},
"undefsafe"
:
{
"version"
:
"2.0.3"
,
"resolved"
:
"https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz"
,
"integrity"
:
"sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A=="
,
"requires"
:
{
"debug"
:
"^2.2.0"
}
},
"unique-string"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz"
,
"integrity"
:
"sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg=="
,
"requires"
:
{
"crypto-random-string"
:
"^2.0.0"
}
},
"universalify"
:
{
"version"
:
"0.1.2"
,
"resolved"
:
"https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz"
,
"integrity"
:
"sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
},
"unpipe"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
,
"integrity"
:
"sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"update-notifier"
:
{
"version"
:
"4.1.3"
,
"resolved"
:
"https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz"
,
"integrity"
:
"sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A=="
,
"requires"
:
{
"boxen"
:
"^4.2.0"
,
"chalk"
:
"^3.0.0"
,
"configstore"
:
"^5.0.1"
,
"has-yarn"
:
"^2.1.0"
,
"import-lazy"
:
"^2.1.0"
,
"is-ci"
:
"^2.0.0"
,
"is-installed-globally"
:
"^0.3.1"
,
"is-npm"
:
"^4.0.0"
,
"is-yarn-global"
:
"^0.3.0"
,
"latest-version"
:
"^5.0.0"
,
"pupa"
:
"^2.0.1"
,
"semver-diff"
:
"^3.1.1"
,
"xdg-basedir"
:
"^4.0.0"
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz"
,
"integrity"
:
"sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg=="
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz"
,
"integrity"
:
"sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg=="
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
},
"uri-js"
:
{
"version"
:
"4.4.1"
,
"resolved"
:
"https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"
,
"integrity"
:
"sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="
,
"requires"
:
{
"punycode"
:
"^2.1.0"
}
},
"url-parse-lax"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz"
,
"integrity"
:
"sha1-FrXK/Afb42dsGxmZF3gj1lA6yww="
,
"requires"
:
{
"prepend-http"
:
"^2.0.0"
}
},
"util-deprecate"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
,
"integrity"
:
"sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"utils-merge"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz"
,
"integrity"
:
"sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"uuid"
:
{
"version"
:
"3.4.0"
,
"resolved"
:
"https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz"
,
"integrity"
:
"sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"vary"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
,
"integrity"
:
"sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"verror"
:
{
"version"
:
"1.10.0"
,
"resolved"
:
"https://registry.npmjs.org/verror/-/verror-1.10.0.tgz"
,
"integrity"
:
"sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA="
,
"requires"
:
{
"assert-plus"
:
"^1.0.0"
,
"core-util-is"
:
"1.0.2"
,
"extsprintf"
:
"^1.2.0"
}
},
"widest-line"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz"
,
"integrity"
:
"sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg=="
,
"requires"
:
{
"string-width"
:
"^4.0.0"
}
},
"wrappy"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
,
"integrity"
:
"sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write-file-atomic"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz"
,
"integrity"
:
"sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q=="
,
"requires"
:
{
"imurmurhash"
:
"^0.1.4"
,
"is-typedarray"
:
"^1.0.0"
,
"signal-exit"
:
"^3.0.2"
,
"typedarray-to-buffer"
:
"^3.1.5"
}
},
"xdg-basedir"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz"
,
"integrity"
:
"sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q=="
},
"yallist"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"
,
"integrity"
:
"sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
},
"uri-js"
:
{
"version"
:
"4.4.1"
,
"resolved"
:
"https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"
,
"integrity"
:
"sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="
,
"requires"
:
{
"punycode"
:
"^2.1.0"
}
},
"url-parse-lax"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz"
,
"integrity"
:
"sha1-FrXK/Afb42dsGxmZF3gj1lA6yww="
,
"requires"
:
{
"prepend-http"
:
"^2.0.0"
}
},
"util-deprecate"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
,
"integrity"
:
"sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"utils-merge"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz"
,
"integrity"
:
"sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"uuid"
:
{
"version"
:
"3.4.0"
,
"resolved"
:
"https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz"
,
"integrity"
:
"sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"vary"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
,
"integrity"
:
"sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"verror"
:
{
"version"
:
"1.10.0"
,
"resolved"
:
"https://registry.npmjs.org/verror/-/verror-1.10.0.tgz"
,
"integrity"
:
"sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA="
,
"requires"
:
{
"assert-plus"
:
"^1.0.0"
,
"core-util-is"
:
"1.0.2"
,
"extsprintf"
:
"^1.2.0"
}
},
"widest-line"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz"
,
"integrity"
:
"sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg=="
,
"requires"
:
{
"string-width"
:
"^4.0.0"
}
},
"wrappy"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
,
"integrity"
:
"sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write-file-atomic"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz"
,
"integrity"
:
"sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q=="
,
"requires"
:
{
"imurmurhash"
:
"^0.1.4"
,
"is-typedarray"
:
"^1.0.0"
,
"signal-exit"
:
"^3.0.2"
,
"typedarray-to-buffer"
:
"^3.1.5"
}
},
"xdg-basedir"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz"
,
"integrity"
:
"sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q=="
},
"yallist"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"
,
"integrity"
:
"sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
}
...
...
routes/index.js
View file @
d94cbed
...
...
@@ -2,7 +2,7 @@ var express = require("express");
var
router
=
express
.
Router
();
var
request
=
require
(
"request"
);
var
bodyParser
=
require
(
'body-parser'
);
var
bodyParser
=
require
(
"body-parser"
);
var
{
OAuth2Client
}
=
require
(
"google-auth-library"
);
var
querystring
=
require
(
"querystring"
);
...
...
@@ -10,11 +10,11 @@ var querystring = require("querystring");
var
CLIENT_ID
=
"94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"
;
var
client
=
new
OAuth2Client
(
CLIENT_ID
);
var
mysql
=
require
(
'mysql'
)
var
mysql
=
require
(
"mysql"
);
var
session
=
require
(
"express-session"
);
var
FileStore
=
require
(
"session-file-store"
)(
session
);
router
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
//url인코딩 x
router
.
use
(
bodyParser
.
json
());
//json방식으로 파
router
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
//url인코딩 x
router
.
use
(
bodyParser
.
json
());
//json방식으로 파
router
.
use
(
session
({
secret
:
"209"
,
// 암호화
...
...
@@ -24,10 +24,10 @@ router.use(
})
);
var
connection
=
mysql
.
createConnection
({
host
:
'localhost'
,
user
:
'root'
,
password
:
'g79465'
,
database
:
'caferecommend'
host
:
"localhost"
,
user
:
"root"
,
password
:
"g79465"
,
database
:
"caferecommend"
,
});
connection
.
connect
();
/* GET home page. */
...
...
@@ -59,22 +59,20 @@ router.post("/index", (req, res) => {
});
router
.
get
(
"/login"
,
checkAuthenticated
,
(
req
,
res
)
=>
{
var
sql
=
'SELECT * FROM USER WHERE EMAIL=?'
;
var
parameter
=
[
req
.
session
.
user
.
email
];
connection
.
query
(
sql
,
parameter
,
function
(
err
,
row
)
{
if
(
err
)
{
var
sql
=
"SELECT * FROM USER WHERE EMAIL=?"
;
var
parameter
=
[
req
.
session
.
user
.
email
];
connection
.
query
(
sql
,
parameter
,
function
(
err
,
row
)
{
if
(
err
)
{
console
.
log
(
err
);
}
else
{
}
else
{
if
(
row
.
length
>
0
)
{
console
.
log
(
"이미 가입이 되어있는 아이디"
)
console
.
log
(
"이미 가입이 되어있는 아이디"
)
;
req
.
session
.
user
.
nickname
=
row
[
0
].
NICKNAME
;
req
.
session
.
user
.
age
=
row
[
0
].
AGE
;
req
.
session
.
user
.
gender
=
row
[
0
].
GENDER
;
return
res
.
render
(
'map'
,
{
user
:
req
.
session
.
user
})
}
else
{
return
res
.
render
(
"login"
,
{
user
:
req
.
session
.
user
,
message
:
'none'
});
return
res
.
render
(
"map"
,
{
user
:
req
.
session
.
user
});
}
else
{
return
res
.
render
(
"login"
,
{
user
:
req
.
session
.
user
,
message
:
"none"
});
}
}
});
...
...
@@ -84,65 +82,42 @@ router.post("/login", (req, res) => {
console
.
log
(
req
.
body
.
nickname
);
console
.
log
(
req
.
body
.
age
);
console
.
log
(
req
.
body
.
gender
);
var
sql
=
' SELECT * FROM USER WHERE NICKNAME=?'
;
var
parameter
=
[
req
.
body
.
nickname
];
connection
.
query
(
sql
,
parameter
,
function
(
err
,
row
){
if
(
err
){
console
.
log
(
err
);
}
if
(
row
.
length
>
0
){
console
.
log
(
'동일 닉네임있음'
);
return
res
.
render
(
"login"
,
{
user
:
req
.
session
.
user
,
message
:
'same nickname'
});
}
else
{
req
.
session
.
user
.
nickname
=
req
.
body
.
nickname
;
req
.
session
.
user
.
age
=
req
.
body
.
age
;
req
.
session
.
user
.
gender
=
req
.
body
.
gender
;
var
sql
=
'INSERT INTO USER(EMAIL, NAME, NICKNAME, AGE, GENDER) VALUES(?,?,?,?,?)'
;
var
parameter
=
[
req
.
session
.
user
.
email
,
req
.
session
.
user
.
name
,
req
.
session
.
user
.
nickname
,
req
.
session
.
user
.
age
,
req
.
session
.
user
.
gender
];
connection
.
query
(
sql
,
parameter
,
function
(
err
,
row
){
if
(
err
){
console
.
log
(
err
);
}
else
{
console
.
log
(
"새로운 user데이터 입력"
);
}
});
return
res
.
render
(
"map"
,
{
user
:
req
.
session
.
user
});
}
});
});
router
.
get
(
"/cafe"
,
(
req
,
res
)
=>
{
let
code
=
"CE7"
;
let
encodedStr
=
querystring
.
escape
(
code
);
let
kakaoOptions
=
{
uri
:
`https://dapi.kakao.com/v2/local/search/category.json?category_group_code=
${
encodedStr
}
`
,
method
:
"GET"
,
headers
:
{
Authorization
:
"KakaoAK 2f3999076db5d32db975ab9862a64480"
,
},
encoding
:
"utf-8"
,
};
request
(
kakaoOptions
,
callback
);
function
callback
(
error
,
res
,
body
)
{
console
.
log
(
body
);
let
kakaoPlaces
=
JSON
.
parse
(
body
);
for
(
document
of
kakaoPlaces
.
documents
)
{
console
.
log
(
document
.
id
);
console
.
log
(
document
.
place_name
);
var
sql
=
" SELECT * FROM USER WHERE NICKNAME=?"
;
var
parameter
=
[
req
.
body
.
nickname
];
connection
.
query
(
sql
,
parameter
,
function
(
err
,
row
)
{
if
(
err
)
{
console
.
log
(
err
);
}
}
return
;
});
router
.
get
(
"/map"
,
(
req
,
res
)
=>
{
res
.
render
(
"map"
);
if
(
row
.
length
>
0
)
{
console
.
log
(
"동일 닉네임있음"
);
return
res
.
render
(
"login"
,
{
user
:
req
.
session
.
user
,
message
:
"same nickname"
,
});
}
else
{
req
.
session
.
user
.
nickname
=
req
.
body
.
nickname
;
req
.
session
.
user
.
age
=
req
.
body
.
age
;
req
.
session
.
user
.
gender
=
req
.
body
.
gender
;
var
sql
=
"INSERT INTO USER(EMAIL, NAME, NICKNAME, AGE, GENDER) VALUES(?,?,?,?,?)"
;
var
parameter
=
[
req
.
session
.
user
.
email
,
req
.
session
.
user
.
name
,
req
.
session
.
user
.
nickname
,
req
.
session
.
user
.
age
,
req
.
session
.
user
.
gender
,
];
connection
.
query
(
sql
,
parameter
,
function
(
err
,
row
)
{
if
(
err
)
{
console
.
log
(
err
);
}
else
{
console
.
log
(
"새로운 user데이터 입력"
);
}
});
return
res
.
render
(
"map"
,
{
user
:
req
.
session
.
user
});
}
});
});
module
.
exports
=
router
;
...
...
@@ -163,7 +138,7 @@ function checkAuthenticated(req, res, next) {
verify
()
.
then
(()
=>
{
req
.
session
.
user
.
name
=
user
.
name
;
req
.
session
.
user
.
email
=
user
.
email
;
req
.
session
.
user
.
email
=
user
.
email
;
next
();
})
.
catch
((
err
)
=>
{
...
...
@@ -172,12 +147,13 @@ function checkAuthenticated(req, res, next) {
}
router
.
get
(
"/map"
,
(
req
,
res
)
=>
{
console
.
log
(
req
.
session
.
user
);
if
(
req
.
session
.
user
)
{
res
.
render
(
"map"
);
}
res
.
render
(
"map"
);
});
router
.
get
(
'/logout'
,
function
(
req
,
res
){
req
.
session
.
destroy
();
//세션비우기
res
.
redirect
(
'/'
);
router
.
get
(
"/logout"
,
function
(
req
,
res
)
{
req
.
session
.
destroy
();
//세션비우기
res
.
redirect
(
"/"
);
});
...
...
sessions/VvsS_GKME1Xfd8FpHFgJlt7bWhEaQj5k.json
0 → 100644
View file @
d94cbed
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1621408098038
}
\ No newline at end of file
sessions/W_6Y5JZDcdIB7Dox4_6wie-sInWOdJS4.json
0 → 100644
View file @
d94cbed
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1621338937349
}
\ No newline at end of file
sessions/Z-mnYpo3ju8q-ID-yPumLPu1bxl3vEtf.json
0 → 100644
View file @
d94cbed
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1621338737470
}
\ No newline at end of file
sessions/kVae1hrGwFmV4Ljkk8tHhoTai-xCh1fM.json
0 → 100644
View file @
d94cbed
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1621337475210
}
\ No newline at end of file
views/map.ejs
View file @
d94cbed
<!DOCTYPE html>
<html>
<head>
<title>
KaKao Map
</title>
<link
rel=
"stylesheet"
href=
"/stylesheets/style.css"
/>
<title>
Cafe Map
</title>
<style>
.map_wrap
,
.map_wrap
*
{
margin
:
0
;
padding
:
0
;
font-family
:
"Malgun Gothic"
,
dotum
,
"돋움"
,
sans-serif
;
font-size
:
12px
;
}
.map_wrap
{
position
:
relative
;
width
:
100%
;
height
:
350px
;
}
#category
{
position
:
absolute
;
top
:
10px
;
left
:
10px
;
border-radius
:
5px
;
border
:
1px
solid
#909090
;
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
0.4
);
background
:
#fff
;
overflow
:
hidden
;
z-index
:
2
;
}
#category
li
{
float
:
left
;
list-style
:
none
;
width
:
50px
;
border-right
:
1px
solid
#acacac
;
padding
:
6px
0
;
text-align
:
center
;
cursor
:
pointer
;
}
#category
li
.on
{
background
:
#eee
;
}
#category
li
:hover
{
background
:
#ffe6e6
;
border-left
:
1px
solid
#acacac
;
margin-left
:
-1px
;
}
#category
li
:last-child
{
margin-right
:
0
;
border-right
:
0
;
}
#category
li
span
{
display
:
block
;
margin
:
0
auto
3px
;
width
:
27px
;
height
:
28px
;
}
#category
li
.category_bg
{
background
:
url(https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/places_category.png)
no-repeat
;
}
#category
li
.bank
{
background-position
:
-10px
0
;
}
#category
li
.mart
{
background-position
:
-10px
-36px
;
}
#category
li
.pharmacy
{
background-position
:
-10px
-72px
;
}
#category
li
.oil
{
background-position
:
-10px
-108px
;
}
#category
li
.cafe
{
background-position
:
-10px
-144px
;
}
#category
li
.store
{
background-position
:
-10px
-180px
;
}
#category
li
.on
.category_bg
{
background-position-x
:
-46px
;
}
.placeinfo_wrap
{
position
:
absolute
;
bottom
:
28px
;
left
:
-150px
;
width
:
300px
;
}
.placeinfo
{
position
:
relative
;
width
:
100%
;
border-radius
:
6px
;
border
:
1px
solid
#ccc
;
border-bottom
:
2px
solid
#ddd
;
padding-bottom
:
10px
;
background
:
#fff
;
}
.placeinfo
:nth-of-type
(
n
)
{
border
:
0
;
box-shadow
:
0px
1px
2px
#888
;
}
.placeinfo_wrap
.after
{
content
:
""
;
position
:
relative
;
margin-left
:
-12px
;
left
:
50%
;
width
:
22px
;
height
:
12px
;
background
:
url("https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/vertex_white.png")
;
}
.placeinfo
a
,
.placeinfo
a
:hover
,
.placeinfo
a
:active
{
color
:
#fff
;
text-decoration
:
none
;
}
.placeinfo
a
,
.placeinfo
span
{
display
:
block
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
.placeinfo
span
{
margin
:
5px
5px
0
5px
;
cursor
:
default
;
font-size
:
13px
;
}
.placeinfo
.title
{
font-weight
:
bold
;
font-size
:
14px
;
border-radius
:
6px
6px
0
0
;
margin
:
-1px
-1px
0
-1px
;
padding
:
10px
;
color
:
#fff
;
background
:
#d95050
;
background
:
#d95050
url(https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/arrow_white.png)
no-repeat
right
14px
center
;
}
.placeinfo
.tel
{
color
:
#0f7833
;
}
.placeinfo
.jibun
{
color
:
#999
;
font-size
:
11px
;
margin-top
:
0
;
}
</style>
</head>
<body>
<div
id=
"map"
style=
"width: 100%; height: 575px"
></div>
<script
type=
"text/javascript"
src=
"//dapi.kakao.com/v2/maps/sdk.js?appkey=68cbccbcd6f0fef0a213e62ad37393ee"
src=
"//dapi.kakao.com/v2/maps/sdk.js?appkey=68cbccbcd6f0fef0a213e62ad37393ee
&libraries=services
"
></script>
<script>
var
lat
=
""
;
var
lon
=
""
;
var
placeOverlay
=
new
kakao
.
maps
.
CustomOverlay
({
zIndex
:
1
});
var
contentNode
=
document
.
createElement
(
"div"
);
var
markers
=
[];
var
currCategory
=
"CE7"
;
// 카테고리코드: 카페
var
order
=
1
;
var
mapContainer
=
document
.
getElementById
(
"map"
),
mapOption
=
{
center
:
new
kakao
.
maps
.
LatLng
(
36.2477502
,
127.078164
),
...
...
@@ -23,6 +171,26 @@
var
map
=
new
kakao
.
maps
.
Map
(
mapContainer
,
mapOption
);
var
ps
=
new
kakao
.
maps
.
services
.
Places
(
map
);
kakao
.
maps
.
event
.
addListener
(
map
,
"idle"
,
searchPlaces
);
contentNode
.
className
=
"placeinfo_wrap"
;
addEventHandle
(
contentNode
,
"mousedown"
,
kakao
.
maps
.
event
.
preventMap
);
addEventHandle
(
contentNode
,
"touchstart"
,
kakao
.
maps
.
event
.
preventMap
);
placeOverlay
.
setContent
(
contentNode
);
function
addEventHandle
(
target
,
type
,
callback
)
{
if
(
target
.
addEventListener
)
{
target
.
addEventListener
(
type
,
callback
);
}
else
{
target
.
attachEvent
(
"on"
+
type
,
callback
);
}
}
placeOverlay
.
setContent
(
contentNode
);
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
function
(
position
)
{
lat
=
position
.
coords
.
latitude
;
...
...
@@ -41,6 +209,108 @@
function
displayCurrentPosition
(
locPosition
)
{
map
.
setCenter
(
locPosition
);
}
kakao
.
maps
.
event
.
addListener
(
map
,
"idle"
,
searchPlaces
);
function
searchPlaces
()
{
if
(
!
currCategory
)
{
return
;
}
placeOverlay
.
setMap
(
null
);
ps
.
categorySearch
(
currCategory
,
placesSearchCB
,
{
usemapBounds
:
true
});
}
function
placesSearchCB
(
data
,
status
,
pagination
)
{
if
(
status
===
kakao
.
maps
.
services
.
Status
.
OK
)
{
displayPlaces
(
data
);
}
}
function
displayPlaces
(
places
)
{
for
(
var
i
=
0
;
i
<
places
.
length
;
i
++
)
{
var
marker
=
addMarker
(
new
kakao
.
maps
.
LatLng
(
places
[
i
].
y
,
places
[
i
].
x
),
order
);
(
function
(
marker
,
place
)
{
kakao
.
maps
.
event
.
addListener
(
marker
,
"click"
,
function
()
{
displayPlaceInfo
(
place
);
});
})(
marker
,
places
[
i
]);
}
}
function
addMarker
(
position
,
order
)
{
var
imageSrc
=
"https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/places_category.png"
;
var
imageSize
=
new
kakao
.
maps
.
Size
(
27
,
30
);
var
imgOptions
=
{
spriteSize
:
new
kakao
.
maps
.
Size
(
72
,
220
),
spriteOrigin
:
new
kakao
.
maps
.
Point
(
46
,
150
),
offset
:
new
kakao
.
maps
.
Point
(
11
,
28
),
};
var
markerImage
=
new
kakao
.
maps
.
MarkerImage
(
imageSrc
,
imageSize
,
imgOptions
);
var
marker
=
new
kakao
.
maps
.
Marker
({
position
:
position
,
image
:
markerImage
,
});
marker
.
setMap
(
map
);
markers
.
push
(
marker
);
return
marker
;
}
function
displayPlaceInfo
(
place
)
{
var
content
=
'<div class="placeinfo">'
+
' <a class="title" href="'
+
place
.
place_url
+
'" target="_blank" title="'
+
place
.
place_name
+
'">'
+
place
.
place_name
+
"</a>"
;
if
(
place
.
road_address_name
)
{
content
+=
' <span title="'
+
place
.
road_address_name
+
'">'
+
place
.
road_address_name
+
"</span>"
+
' <span class="jibun" title="'
+
place
.
address_name
+
'">(지번 : '
+
place
.
address_name
+
")</span>"
;
}
else
{
content
+=
' <span title="'
+
place
.
address_name
+
'">'
+
place
.
address_name
+
"</span>"
;
}
content
+=
' <span class="tel">'
+
place
.
phone
+
"</span>"
+
"</div>"
+
'<div class="after"></div>'
;
contentNode
.
innerHTML
=
content
;
placeOverlay
.
setPosition
(
new
kakao
.
maps
.
LatLng
(
place
.
y
,
place
.
x
));
placeOverlay
.
setMap
(
map
);
}
</script>
</body>
</html>
...
...
Please
register
or
login
to post a comment