Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
reservation-service
Commits
0ffaebc2
Commit
0ffaebc2
authored
Sep 22, 2020
by
CHAERIN KIM
Browse files
로그인 회원가입 완료
parents
5ac3a10f
694af28b
Changes
22
Show whitespace changes
Inline
Side-by-side
server/.env
0 → 100644
View file @
0ffaebc2
JWT_SECRET=jwtSecret
\ No newline at end of file
server/.gitignore
View file @
0ffaebc2
server/app.js
View file @
0ffaebc2
...
@@ -6,11 +6,18 @@ const logger = require('morgan');
...
@@ -6,11 +6,18 @@ const logger = require('morgan');
const
indexRouter
=
require
(
'
./routes/index
'
);
const
indexRouter
=
require
(
'
./routes/index
'
);
const
usersRouter
=
require
(
'
./routes/users
'
);
const
usersRouter
=
require
(
'
./routes/users
'
);
const
loginRouter
=
require
(
'
./routes/login
'
);
const
connect
=
require
(
'
./schemas
'
);
const
connect
=
require
(
'
./schemas
'
);
const
app
=
express
();
const
app
=
express
();
const
port
=
3030
;
require
(
'
dotenv
'
).
config
();
connect
();
connect
();
app
.
listen
(
port
,
()
=>
console
.
log
(
port
));
// view engine setup
// view engine setup
// app.set('views', path.join(__dirname, 'views'));
// app.set('views', path.join(__dirname, 'views'));
// app.set('view engine', 'pug');
// app.set('view engine', 'pug');
...
@@ -23,6 +30,7 @@ app.use(express.static(path.join(__dirname, 'public')));
...
@@ -23,6 +30,7 @@ app.use(express.static(path.join(__dirname, 'public')));
app
.
use
(
'
/
'
,
indexRouter
);
app
.
use
(
'
/
'
,
indexRouter
);
app
.
use
(
'
/users
'
,
usersRouter
);
app
.
use
(
'
/users
'
,
usersRouter
);
app
.
use
(
'
/login
'
,
loginRouter
);
// catch 404 and forward to error handler
// catch 404 and forward to error handler
app
.
use
(
function
(
req
,
res
,
next
)
{
app
.
use
(
function
(
req
,
res
,
next
)
{
...
@@ -37,7 +45,7 @@ app.use(function(err, req, res, next) {
...
@@ -37,7 +45,7 @@ app.use(function(err, req, res, next) {
// render the error page
// render the error page
res
.
status
(
err
.
status
||
500
);
res
.
status
(
err
.
status
||
500
);
res
.
render
(
'
error
'
);
//
res.render('error');
});
});
module
.
exports
=
app
;
module
.
exports
=
app
;
server/bin/www
View file @
0ffaebc2
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*/
*/
var
app
=
require
(
'
../app
'
);
var
app
=
require
(
'
../app
'
);
var
debug
=
require
(
'
debug
'
)(
'
learn-express
:server
'
);
var
debug
=
require
(
'
debug
'
)(
'
server
:server
'
);
var
http
=
require
(
'
http
'
);
var
http
=
require
(
'
http
'
);
/**
/**
...
...
server/client/package-lock.json
View file @
0ffaebc2
...
@@ -1756,9 +1756,15 @@
...
@@ -1756,9 +1756,15 @@
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
},
},
"@types/node": {
"@types/node": {
<<<<<<< HEAD
"version": "14.11.1",
"version": "14.11.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.1.tgz",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.1.tgz",
"integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw=="
"integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw=="
=======
"version": "14.10.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.10.3.tgz",
"integrity": "sha512-zdN0hor7TLkjAdKTnYW+Y22oIhUUpil5ZD1V1OFq0CR0CLKw+NdR6dkziTfkWRLo6sKzisayoj/GNpNbe4LY9Q=="
>>>>>>> origin/NewMaster
},
},
"@types/parse-json": {
"@types/parse-json": {
"version": "4.0.0",
"version": "4.0.0",
...
@@ -3448,9 +3454,15 @@
...
@@ -3448,9 +3454,15 @@
}
}
},
},
"caniuse-lite": {
"caniuse-lite": {
<<<<<<< HEAD
"version": "1.0.30001133",
"version": "1.0.30001133",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001133.tgz",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001133.tgz",
"integrity": "sha512-s3XAUFaC/ntDb1O3lcw9K8MPeOW7KO3z9+GzAoBxfz1B0VdacXPMKgFUtG4KIsgmnbexmi013s9miVu4h+qMHw=="
"integrity": "sha512-s3XAUFaC/ntDb1O3lcw9K8MPeOW7KO3z9+GzAoBxfz1B0VdacXPMKgFUtG4KIsgmnbexmi013s9miVu4h+qMHw=="
=======
"version": "1.0.30001131",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001131.tgz",
"integrity": "sha512-4QYi6Mal4MMfQMSqGIRPGbKIbZygeN83QsWq1ixpUwvtfgAZot5BrCKzGygvZaV+CnELdTwD0S4cqUNozq7/Cw=="
>>>>>>> origin/NewMaster
},
},
"capture-exit": {
"capture-exit": {
"version": "2.0.0",
"version": "2.0.0",
...
@@ -4372,11 +4384,19 @@
...
@@ -4372,11 +4384,19 @@
}
}
},
},
"debug": {
"debug": {
<<<<<<< HEAD
"version": "4.2.0",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"requires": {
"requires": {
"ms": "2.1.2"
"ms": "2.1.2"
=======
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
>>>>>>> origin/NewMaster
}
}
},
},
"decamelize": {
"decamelize": {
...
@@ -7791,11 +7811,14 @@
...
@@ -7791,11 +7811,14 @@
}
}
}
}
},
},
<<<<<<< HEAD
"jquery": {
"jquery": {
"version": "3.5.1",
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
},
},
=======
>>>>>>> origin/NewMaster
"js-tokens": {
"js-tokens": {
"version": "4.0.0",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
...
@@ -9430,11 +9453,14 @@
...
@@ -9430,11 +9453,14 @@
"ts-pnp": "^1.1.6"
"ts-pnp": "^1.1.6"
}
}
},
},
<<<<<<< HEAD
"popper.js": {
"popper.js": {
"version": "1.16.1",
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
},
},
=======
>>>>>>> origin/NewMaster
"portfinder": {
"portfinder": {
"version": "1.0.28",
"version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
...
@@ -9782,9 +9808,15 @@
...
@@ -9782,9 +9808,15 @@
}
}
},
},
"postcss-load-config": {
"postcss-load-config": {
<<<<<<< HEAD
"version": "2.1.1",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.1.tgz",
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.1.tgz",
"integrity": "sha512-D2ENobdoZsW0+BHy4x1CAkXtbXtYWYRIxL/JbtRBqrRGOPtJ2zoga/bEZWhV/ShWB5saVxJMzbMdSyA/vv4tXw==",
"integrity": "sha512-D2ENobdoZsW0+BHy4x1CAkXtbXtYWYRIxL/JbtRBqrRGOPtJ2zoga/bEZWhV/ShWB5saVxJMzbMdSyA/vv4tXw==",
=======
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.0.tgz",
"integrity": "sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==",
>>>>>>> origin/NewMaster
"requires": {
"requires": {
"cosmiconfig": "^5.0.0",
"cosmiconfig": "^5.0.0",
"import-cwd": "^2.0.0"
"import-cwd": "^2.0.0"
...
@@ -10333,6 +10365,7 @@
...
@@ -10333,6 +10365,7 @@
}
}
},
},
"postcss-selector-parser": {
"postcss-selector-parser": {
<<<<<<< HEAD
"version": "6.0.3",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.3.tgz",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.3.tgz",
"integrity": "sha512-0ClFaY4X1ra21LRqbW6y3rUbWcxnSVkDFG57R7Nxus9J9myPFlv+jYDMohzpkBx0RrjjiqjtycpchQ+PLGmZ9w==",
"integrity": "sha512-0ClFaY4X1ra21LRqbW6y3rUbWcxnSVkDFG57R7Nxus9J9myPFlv+jYDMohzpkBx0RrjjiqjtycpchQ+PLGmZ9w==",
...
@@ -10341,6 +10374,15 @@
...
@@ -10341,6 +10374,15 @@
"indexes-of": "^1.0.1",
"indexes-of": "^1.0.1",
"uniq": "^1.0.1",
"uniq": "^1.0.1",
"util-deprecate": "^1.0.2"
"util-deprecate": "^1.0.2"
=======
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz",
"integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==",
"requires": {
"cssesc": "^3.0.0",
"indexes-of": "^1.0.1",
"uniq": "^1.0.1"
>>>>>>> origin/NewMaster
}
}
},
},
"postcss-svgo": {
"postcss-svgo": {
...
@@ -11129,9 +11171,15 @@
...
@@ -11129,9 +11171,15 @@
"integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q=="
"integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q=="
},
},
"regexpu-core": {
"regexpu-core": {
<<<<<<< HEAD
"version": "4.7.1",
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz",
"integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==",
"integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==",
=======
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz",
"integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==",
>>>>>>> origin/NewMaster
"requires": {
"requires": {
"regenerate": "^1.4.0",
"regenerate": "^1.4.0",
"regenerate-unicode-properties": "^8.2.0",
"regenerate-unicode-properties": "^8.2.0",
...
...
server/client/package.json
View file @
0ffaebc2
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
"test"
:
"react-scripts test"
,
"test"
:
"react-scripts test"
,
"eject"
:
"react-scripts eject"
"eject"
:
"react-scripts eject"
},
},
"proxy"
:
"http://localhost:3030"
,
"eslintConfig"
:
{
"eslintConfig"
:
{
"extends"
:
"react-app"
"extends"
:
"react-app"
},
},
...
...
server/client/src/Components/Menu.js
0 → 100644
View file @
0ffaebc2
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
styled
from
'
styled-components
'
;
const
Nav
=
styled
.
nav
`
background-color: #981e1e;
`
function
Menu
()
{
return
(
<
Nav
className
=
"
navbar sticky-top navbar-expand-md
"
>
<
Link
to
=
"
/home
"
className
=
"
navbar-brand
"
>
대관
서비스
<
/Link
>
<
button
className
=
"
navbar-toggler
"
type
=
"
button
"
data
-
toggle
=
"
collapse
"
data
-
target
=
"
#collapsibleNavbar
"
aria
-
controls
=
"
collapsibleNavbar
"
>
<
span
className
=
"
navbar-toggler-icon
"
><
/span
>
<
/button
>
<
div
className
=
"
collapse navbar-collapse
"
id
=
"
collapsibleNavbar
"
>
<
ul
className
=
"
navbar-nav
"
>
<
li
className
=
"
nav-item
"
>
<
Link
to
=
"
/home
"
className
=
"
nav-link
"
>
대관
현황
<
/Link
>
<
/li
>
<
li
className
=
"
nav-item
"
>
<
Link
to
=
"
/apply
"
className
=
"
nav-link
"
>
대관
신청
<
/Link
>
<
/li
>
<
li
className
=
"
nav-item
"
>
<
Link
to
=
"
/check
"
className
=
"
nav-link
"
>
대관
확인
/
취소
<
/Link
>
<
/li
>
<
li
className
=
"
nav-item
"
>
<
Link
to
=
"
/notice
"
className
=
"
nav-link
"
>
공지사항
<
/Link
>
<
/li
>
<
/ul
>
<
/div
>
<
/Nav
>
)
}
export
default
Menu
\ No newline at end of file
server/client/src/Pages/ApplyPage.js
0 → 100644
View file @
0ffaebc2
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Menu
from
'
../Components/Menu
'
;
function
Apply
()
{
return
(
<
div
>
<
Menu
/>
<
div
className
=
"
container
"
>
apply
<
/div
>
<
/div
>
)
}
export
default
Apply
\ No newline at end of file
server/client/src/Pages/CheckPage.js
0 → 100644
View file @
0ffaebc2
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Menu
from
'
../Components/Menu
'
;
function
Check
()
{
return
(
<
div
>
<
Menu
/>
<
div
className
=
"
container
"
>
check
<
/div
>
<
/div
>
)
}
export
default
Check
\ No newline at end of file
server/client/src/Pages/HomePage.js
0 → 100644
View file @
0ffaebc2
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Menu
from
'
../Components/Menu
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
function
Home
()
{
return
(
<
div
>
<
Menu
/>
<
div
className
=
"
container
"
>
home
<
button
><
Link
to
=
"
/
"
>
로그인
<
/Link></
button
>
<
button
><
Link
to
=
"
/signup
"
>
회원가입
<
/Link></
button
>
<
/div
>
<
/div
>
)
}
export
default
Home
\ No newline at end of file
server/client/src/Pages/LoginPage.js
0 → 100644
View file @
0ffaebc2
import
React
,
{
useState
}
from
'
react
'
;
import
styled
from
'
styled-components
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
{
Formik
}
from
'
formik
'
;
import
*
as
Yup
from
'
yup
'
;
import
axios
from
'
axios
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
const
Log
=
styled
.
div
`
background-color: #981e1e;
`
const
Logo
=
styled
.
div
`
background-color: #E76A6A;
`
function
Login
()
{
const
[
state
,
setState
]
=
useState
(
false
);
if
(
state
)
{
return
<
Redirect
to
=
"
/home
"
/>
;
}
return
(
<
div
className
=
"
container-fluid
"
>
<
div
className
=
"
row
"
>
<
Logo
className
=
"
col-md-5 col-12
"
>
<
h2
>
고려대학교
<
/h2
>
<
h4
>
대관
시스템
<
/h4
>
<
/Logo
>
<
Log
className
=
"
col-md-7 col-12
"
>
<
Formik
initialValues
=
{{
id
:
''
,
password
:
''
}}
validationSchema
=
{
Yup
.
object
({
id
:
Yup
.
string
()
.
required
(
'
아이디를 입력해주세요.
'
),
password
:
Yup
.
string
()
.
required
(
'
비밀번호를 입력해주세요.
'
)
.
min
(
8
,
'
8자 이상 입력해주세요.
'
),
})}
onSubmit
=
{(
values
,
{
setSubmitting
})
=>
{
axios
({
method
:
'
post
'
,
url
:
'
/login
'
,
data
:
values
,
}).
then
(
res
=>
{
if
(
res
.
status
===
404
)
return
alert
(
res
.
data
.
error
)
alert
(
"
로그인이 완료되었습니다!
"
)
localStorage
.
setItem
(
'
token
'
,
res
.
data
.
token
);
localStorage
.
setItem
(
'
id
'
,
res
.
data
.
users
.
_id
);
setState
(
true
);
})
.
catch
(
err
=>
{
alert
(
err
.
error
)
});
setTimeout
(()
=>
{
setSubmitting
(
false
);
},
400
);
// finish the cycle in handler
}}
>
{({
errors
,
touched
,
handleSubmit
,
getFieldProps
,
// contain values, handleChange, handleBlur
isSubmitting
,
})
=>
(
<
div
className
=
"
row justify-content-center align-items-center
"
>
<
form
onSubmit
=
{
handleSubmit
}
className
=
"
col-sm-3
"
>
<
div
className
=
"
form-group mb-4
"
>
<
input
className
=
{(
touched
.
id
&&
errors
.
id
?
'
form-control is-invalid
'
:
"
form-control
"
)}
type
=
"
text
"
name
=
"
id
"
{...
getFieldProps
(
'
id
'
)}
placeholder
=
"
Input id
"
/>
{
touched
.
id
&&
errors
.
id
?
(
<
div
className
=
"
invalid-feedback text-left
"
>
{
errors
.
id
}
<
/div
>
)
:
null
}
<
/div
>
<
div
className
=
"
form-group mb-4
"
>
<
input
className
=
{(
touched
.
password
&&
errors
.
password
?
'
form-control is-invalid
'
:
"
form-control
"
)}
type
=
"
password
"
name
=
"
password
"
{...
getFieldProps
(
'
password
'
)}
placeholder
=
"
Input Password
"
/>
{
touched
.
password
&&
errors
.
password
?
(
<
div
className
=
"
invalid-feedback text-left
"
>
{
errors
.
password
}
<
/div
>
)
:
null
}
<
/div
>
<
button
type
=
"
submit
"
className
=
"
btn btn-dark
"
disabled
=
{
isSubmitting
}
>
Login
<
/button
>
<
button
><
Link
to
=
"
/home
"
>
홈
<
/Link></
button
>
<
Link
to
=
"
/signup
"
>
비밀번호를
잊으셨나요
?
<
/Link
>
<
div
><
/div
>
<
Link
to
=
"
/signup
"
>
회원이
아니신가요
?
<
/Link
>
<
/form
>
<
/div
>
)}
<
/Formik
>
<
/Log
>
<
/div
>
<
/div
>
)
}
export
default
Login
\ No newline at end of file
server/client/src/Pages/NoticePage.js
0 → 100644
View file @
0ffaebc2
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Menu
from
'
../Components/Menu
'
;
function
Notice
()
{
return
(
<
div
>
<
Menu
/>
<
div
className
=
"
container
"
>
notice
<
/div
>
<
/div
>
)
}
export
default
Notice
\ No newline at end of file
server/client/src/Pages/SignupPage.js
0 → 100644
View file @
0ffaebc2
import
React
,
{
useState
}
from
'
react
'
;
import
{
Formik
}
from
'
formik
'
;
import
*
as
Yup
from
'
yup
'
;
import
axios
from
'
axios
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
function
Signup
()
{
const
[
state
,
setState
]
=
useState
(
false
);
if
(
state
)
{
return
<
Redirect
to
=
"
/login
"
/>
;
}
return
(
<
div
className
=
"
d-flex flex-column justify-content-between vh-100
"
>
<
Formik
initialValues
=
{{
name
:
''
,
id
:
''
,
password
:
''
,
password2
:
''
}}
validationSchema
=
{
Yup
.
object
({
name
:
Yup
.
string
()
.
required
(
'
이름을 입력해주세요.
'
),
id
:
Yup
.
string
()
.
required
(
'
아이디를 입력해주세요.
'
),
password
:
Yup
.
string
()
.
required
(
'
비밀번호를 입력해주세요.
'
)
.
min
(
8
,
'
8자 이상 입력해주세요.
'
),
password2
:
Yup
.
string
()
.
required
(
'
비밀번호를 다시 입력해주세요.
'
)
.
min
(
8
,
'
8자 이상 입력해주세요.
'
)
.
oneOf
([
Yup
.
ref
(
"
password
"
),
null
],
'
비밀번호가 일치하지 않습니다.
'
),
})}
onSubmit
=
{(
values
,
{
setSubmitting
})
=>
{
axios
({
method
:
'
post
'
,
url
:
'
/users
'
,
data
:
values
,
}).
then
(
res
=>
{
if
(
res
.
status
===
404
)
return
alert
(
res
.
data
.
error
)
alert
(
"
회원가입이 완료되었습니다!
"
)
setState
(
true
);
})
.
catch
(
err
=>
{
alert
(
err
.
error
)
});
setTimeout
(()
=>
{
setSubmitting
(
false
);
},
400
);
// finish the cycle in handler
}}
>
{({
errors
,
touched
,
handleSubmit
,
getFieldProps
,
// contain values, handleChange, handleBlur
isSubmitting
,
})
=>
(
<
div
className
=
"
row justify-content-center align-items-center
"
>
<
form
onSubmit
=
{
handleSubmit
}
className
=
"
col-sm-3
"
>
<
div
className
=
"
form-group mb-4
"
>
<
input
className
=
{(
touched
.
name
&&
errors
.
name
?
'
form-control is-invalid
'
:
"
form-control
"
)}
type
=
"
text
"
name
=
"
name
"
{...
getFieldProps
(
'
name
'
)}
placeholder
=
"
Input Name
"
/>
{
touched
.
name
&&
errors
.
name
?
(
<
div
className
=
"
invalid-feedback text-left
"
>
{
errors
.
name
}
<
/div
>
)
:
null
}
<
/div
>
<
div
className
=
"
form-group mb-4
"
>
<
input
className
=
{(
touched
.
id
&&
errors
.
id
?
'
form-control is-invalid
'
:
"
form-control
"
)}
type
=
"
text
"
name
=
"
id
"
{...
getFieldProps
(
'
id
'
)}
placeholder
=
"
Input id
"
/>
{
touched
.
id
&&
errors
.
id
?
(
<
div
className
=
"
invalid-feedback text-left
"
>
{
errors
.
id
}
<
/div
>
)
:
null
}
<
/div
>
<
div
className
=
"
form-group mb-4
"
>
<
input
className
=
{(
touched
.
password
&&
errors
.
password
?
'
form-control is-invalid
'
:
"
form-control
"
)}
type
=
"
password
"
name
=
"
password
"
{...
getFieldProps
(
'
password
'
)}
placeholder
=
"
Input Password
"
/>
{
touched
.
password
&&
errors
.
password
?
(
<
div
className
=
"
invalid-feedback text-left
"
>
{
errors
.
password
}
<
/div
>
)
:
null
}
<
/div
>
<
div
className
=
"
form-group mb-4
"
>
<
input
className
=
{(
touched
.
password2
&&
errors
.
password2
?
'
form-control is-invalid
'
:
"
form-control
"
)}
type
=
"
password
"
name
=
"
password2
"
{...
getFieldProps
(
'
password2
'
)}
placeholder
=
"
Input Confirm Password
"
/>
{
touched
.
password2
&&
errors
.
password2
?
(
<
div
className
=
"
invalid-feedback text-left
"
>
{
errors
.
password2
}
<
/div
>
)
:
null
}
<
/div
>
<
button
type
=
"
submit
"
className
=
"
btn btn-dark
"
disabled
=
{
isSubmitting
}
>
Sign
Up
<
/button
>
<
button
><
Link
to
=
"
/
"
>
로그인
<
/Link></
button
>
<
button
><
Link
to
=
"
/home
"
>
홈
<
/Link></
button
>
<
/form
>
<
/div
>
)}
<
/Formik
>
<
/div
>
);
}
export
default
Signup
;
server/client/src/index.js
View file @
0ffaebc2
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
ReactDOM
from
'
react-dom
'
;
import
ReactDOM
from
'
react-dom
'
;
import
'
./index.css
'
;
import
App
from
'
./App
'
;
import
*
as
serviceWorker
from
'
./serviceWorker
'
;
import
*
as
serviceWorker
from
'
./serviceWorker
'
;
import
{
BrowserRouter
as
Router
,
Route
,
Redirect
,
Switch
}
from
'
react-router-dom
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
import
axios
from
'
axios
'
;
//import { PrivateRoute } from './PrivateRoute';
import
Login
from
'
./Pages/LoginPage
'
;
import
Home
from
'
./Pages/HomePage
'
;
import
Signup
from
'
./Pages/SignupPage
'
;
import
Apply
from
'
./Pages/ApplyPage
'
;
import
Check
from
'
./Pages/CheckPage
'
;
import
Notice
from
'
./Pages/NoticePage
'
;
axios
.
defaults
.
validateStatus
=
function
(
status
)
{
return
status
<
500
;
// default
}
ReactDOM
.
render
(
ReactDOM
.
render
(
<
React
.
StrictMode
>
<
Router
>
<
App
/>
<
Switch
>
<
/React.StrictMode>
,
<
Route
exact
path
=
"
/
"
component
=
{
Login
}
/
>
<
Route
path
=
"
/home
"
component
=
{
Home
}
/
>
<
Route
path
=
"
/signup
"
component
=
{
Signup
}
/
>
<
Route
path
=
"
/apply
"
component
=
{
Apply
}
/
>
<
Route
path
=
"
/check
"
component
=
{
Check
}
/
>
<
Route
path
=
"
/notice
"
component
=
{
Notice
}
/
>
<
Redirect
path
=
"
/login
"
to
=
"
/
"
/>
<
Redirect
path
=
"
/home
"
to
=
"
/
"
/>
<
/Switch
>
<
/Router>
,
document
.
getElementById
(
'
root
'
)
document
.
getElementById
(
'
root
'
)
);
);
...
...
server/package-lock.json
View file @
0ffaebc2
{
{
"name"
:
"
learn-express
"
,
"name"
:
"
server
"
,
"version"
:
"0.0.0"
,
"version"
:
"0.0.0"
,
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
"@
types/babel-types
"
:
{
"@
babel/helper-validator-identifier
"
:
{
"version"
:
"7.0.
9
"
,
"version"
:
"7.
1
0.
4
"
,
"resolved"
:
"https://registry.npmjs.org/@
types/babel-types/-/babel-types
-7.0.
9
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@
babel/helper-validator-identifier/-/helper-validator-identifier
-7.
1
0.
4
.tgz"
,
"integrity"
:
"sha512-
qZLoYeXSTgQuK1h7QQS16hqLGdmqtRmN8w/rl3Au/l5x/zkHx+a4VHrHyBsi1I1vtK2oBHxSzKIu0R5p6spdOA
=="
"integrity"
:
"sha512-
3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw
=="
},
},
"@types/babylon"
:
{
"@babel/parser"
:
{
"version"
:
"6.16.5"
,
"version"
:
"7.11.5"
,
"resolved"
:
"https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz"
,
"integrity"
:
"sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w=="
,
"integrity"
:
"sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q=="
},
"@babel/types"
:
{
"version"
:
"7.11.5"
,
"resolved"
:
"https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz"
,
"integrity"
:
"sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q=="
,
"requires"
:
{
"requires"
:
{
"@types/babel-types"
:
"*"
"@babel/helper-validator-identifier"
:
"^7.10.4"
,
"lodash"
:
"^4.17.19"
,
"to-fast-properties"
:
"^2.0.0"
}
}
},
},
"abbrev"
:
{
"abbrev"
:
{
...
@@ -32,24 +39,9 @@
...
@@ -32,24 +39,9 @@
}
}
},
},
"acorn"
:
{
"acorn"
:
{
"version"
:
"3.3.0"
,
"version"
:
"7.4.0"
,
"resolved"
:
"https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz"
,
"integrity"
:
"sha1-ReN/s56No/JbruP/U2niu18iAXo="
"integrity"
:
"sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w=="
},
"acorn-globals"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz"
,
"integrity"
:
"sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8="
,
"requires"
:
{
"acorn"
:
"^4.0.4"
},
"dependencies"
:
{
"acorn"
:
{
"version"
:
"4.0.13"
,
"resolved"
:
"https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz"
,
"integrity"
:
"sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c="
}
}
},
},
"align-text"
:
{
"align-text"
:
{
"version"
:
"0.1.4"
,
"version"
:
"0.1.4"
,
...
@@ -61,11 +53,6 @@
...
@@ -61,11 +53,6 @@
"repeat-string"
:
"^1.5.2"
"repeat-string"
:
"^1.5.2"
}
}
},
},
"amdefine"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz"
,
"integrity"
:
"sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
},
"ansi-regex"
:
{
"ansi-regex"
:
{
"version"
:
"2.1.1"
,
"version"
:
"2.1.1"
,
"resolved"
:
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz"
,
...
@@ -120,31 +107,19 @@
...
@@ -120,31 +107,19 @@
"resolved"
:
"https://registry.npmjs.org/asap/-/asap-2.0.6.tgz"
,
"resolved"
:
"https://registry.npmjs.org/asap/-/asap-2.0.6.tgz"
,
"integrity"
:
"sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
"integrity"
:
"sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
},
},
"babel-runtime"
:
{
"assert-never"
:
{
"version"
:
"6.26.0"
,
"version"
:
"1.2.1"
,
"resolved"
:
"https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/assert-never/-/assert-never-1.2.1.tgz"
,
"integrity"
:
"sha1-llxwWGaOgrVde/4E/yM3vItWR/4="
,
"integrity"
:
"sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw=="
"requires"
:
{
"core-js"
:
"^2.4.0"
,
"regenerator-runtime"
:
"^0.11.0"
}
},
},
"babel-
types
"
:
{
"babel-
walk
"
:
{
"version"
:
"
6.26.0
"
,
"version"
:
"
3.0.0-canary-5
"
,
"resolved"
:
"https://registry.npmjs.org/babel-
types
/-/babel-
types-6.26.0
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/babel-
walk
/-/babel-
walk-3.0.0-canary-5
.tgz"
,
"integrity"
:
"sha
1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc
="
,
"integrity"
:
"sha
512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw=
="
,
"requires"
:
{
"requires"
:
{
"babel-runtime"
:
"^6.26.0"
,
"@babel/types"
:
"^7.9.6"
"esutils"
:
"^2.0.2"
,
"lodash"
:
"^4.17.4"
,
"to-fast-properties"
:
"^1.0.3"
}
}
},
},
"babylon"
:
{
"version"
:
"6.18.0"
,
"resolved"
:
"https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz"
,
"integrity"
:
"sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"balanced-match"
:
{
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz"
,
...
@@ -156,6 +131,13 @@
...
@@ -156,6 +131,13 @@
"integrity"
:
"sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg=="
,
"integrity"
:
"sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg=="
,
"requires"
:
{
"requires"
:
{
"safe-buffer"
:
"5.1.2"
"safe-buffer"
:
"5.1.2"
},
"dependencies"
:
{
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
,
"integrity"
:
"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
}
},
},
"bcrypt"
:
{
"bcrypt"
:
{
...
@@ -196,6 +178,16 @@
...
@@ -196,6 +178,16 @@
"qs"
:
"6.5.2"
,
"qs"
:
"6.5.2"
,
"raw-body"
:
"2.3.3"
,
"raw-body"
:
"2.3.3"
,
"type-is"
:
"~1.6.16"
"type-is"
:
"~1.6.16"
},
"dependencies"
:
{
"iconv-lite"
:
{
"version"
:
"0.4.23"
,
"resolved"
:
"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz"
,
"integrity"
:
"sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA=="
,
"requires"
:
{
"safer-buffer"
:
">= 2.1.2 < 3"
}
}
}
}
},
},
"brace-expansion"
:
{
"brace-expansion"
:
{
...
@@ -249,15 +241,6 @@
...
@@ -249,15 +241,6 @@
"resolved"
:
"https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz"
,
"resolved"
:
"https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz"
,
"integrity"
:
"sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
"integrity"
:
"sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
},
},
"clean-css"
:
{
"version"
:
"3.4.28"
,
"resolved"
:
"https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz"
,
"integrity"
:
"sha1-vxlF6C/ICPVWlebd6uwBQA79A/8="
,
"requires"
:
{
"commander"
:
"2.8.x"
,
"source-map"
:
"0.4.x"
}
},
"cliui"
:
{
"cliui"
:
{
"version"
:
"2.1.0"
,
"version"
:
"2.1.0"
,
"resolved"
:
"https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz"
,
...
@@ -273,14 +256,6 @@
...
@@ -273,14 +256,6 @@
"resolved"
:
"https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz"
,
"integrity"
:
"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
"integrity"
:
"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
},
"commander"
:
{
"version"
:
"2.8.1"
,
"resolved"
:
"https://registry.npmjs.org/commander/-/commander-2.8.1.tgz"
,
"integrity"
:
"sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ="
,
"requires"
:
{
"graceful-readlink"
:
">= 1.0.0"
}
},
"concat-map"
:
{
"concat-map"
:
{
"version"
:
"0.0.1"
,
"version"
:
"0.0.1"
,
"resolved"
:
"https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
,
...
@@ -324,14 +299,12 @@
...
@@ -324,14 +299,12 @@
"integrity"
:
"sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
"integrity"
:
"sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
},
},
"constantinople"
:
{
"constantinople"
:
{
"version"
:
"
3.1.2
"
,
"version"
:
"
4.0.1
"
,
"resolved"
:
"https://registry.npmjs.org/constantinople/-/constantinople-
3.1.2
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/constantinople/-/constantinople-
4.0.1
.tgz"
,
"integrity"
:
"sha512-
yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZou
w=="
,
"integrity"
:
"sha512-
vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZI
w=="
,
"requires"
:
{
"requires"
:
{
"@types/babel-types"
:
"^7.0.0"
,
"@babel/parser"
:
"^7.6.0"
,
"@types/babylon"
:
"^6.16.2"
,
"@babel/types"
:
"^7.6.1"
"babel-types"
:
"^6.26.0"
,
"babylon"
:
"^6.18.0"
}
}
},
},
"content-disposition"
:
{
"content-disposition"
:
{
...
@@ -363,11 +336,6 @@
...
@@ -363,11 +336,6 @@
"resolved"
:
"https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
,
"resolved"
:
"https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
,
"integrity"
:
"sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
"integrity"
:
"sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
},
"core-js"
:
{
"version"
:
"2.6.11"
,
"resolved"
:
"https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz"
,
"integrity"
:
"sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"core-util-is"
:
{
"core-util-is"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
,
...
@@ -389,6 +357,13 @@
...
@@ -389,6 +357,13 @@
"integrity"
:
"sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="
,
"integrity"
:
"sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="
,
"requires"
:
{
"requires"
:
{
"ms"
:
"2.0.0"
"ms"
:
"2.0.0"
},
"dependencies"
:
{
"ms"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
,
"integrity"
:
"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
}
},
},
"decamelize"
:
{
"decamelize"
:
{
...
@@ -459,11 +434,6 @@
...
@@ -459,11 +434,6 @@
"resolved"
:
"https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
,
"integrity"
:
"sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
"integrity"
:
"sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
},
"esutils"
:
{
"version"
:
"2.0.3"
,
"resolved"
:
"https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz"
,
"integrity"
:
"sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
},
"etag"
:
{
"etag"
:
{
"version"
:
"1.8.1"
,
"version"
:
"1.8.1"
,
"resolved"
:
"https://registry.npmjs.org/etag/-/etag-1.8.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/etag/-/etag-1.8.1.tgz"
,
...
@@ -510,6 +480,11 @@
...
@@ -510,6 +480,11 @@
"version"
:
"0.3.1"
,
"version"
:
"0.3.1"
,
"resolved"
:
"https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
,
"integrity"
:
"sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
"integrity"
:
"sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
},
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
,
"integrity"
:
"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
}
}
},
},
...
@@ -578,11 +553,6 @@
...
@@ -578,11 +553,6 @@
"path-is-absolute"
:
"^1.0.0"
"path-is-absolute"
:
"^1.0.0"
}
}
},
},
"graceful-readlink"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
,
"integrity"
:
"sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
},
"has-symbols"
:
{
"has-symbols"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz"
,
...
@@ -602,12 +572,19 @@
...
@@ -602,12 +572,19 @@
"inherits"
:
"2.0.3"
,
"inherits"
:
"2.0.3"
,
"setprototypeof"
:
"1.1.0"
,
"setprototypeof"
:
"1.1.0"
,
"statuses"
:
">= 1.4.0 < 2"
"statuses"
:
">= 1.4.0 < 2"
},
"dependencies"
:
{
"inherits"
:
{
"version"
:
"2.0.3"
,
"resolved"
:
"https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
,
"integrity"
:
"sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
}
}
}
},
},
"iconv-lite"
:
{
"iconv-lite"
:
{
"version"
:
"0.4.2
3
"
,
"version"
:
"0.4.2
4
"
,
"resolved"
:
"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.2
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.2
4
.tgz"
,
"integrity"
:
"sha512-
neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvD
A=="
,
"integrity"
:
"sha512-
v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/r
A=="
,
"requires"
:
{
"requires"
:
{
"safer-buffer"
:
">= 2.1.2 < 3"
"safer-buffer"
:
">= 2.1.2 < 3"
}
}
...
@@ -630,9 +607,9 @@
...
@@ -630,9 +607,9 @@
}
}
},
},
"inherits"
:
{
"inherits"
:
{
"version"
:
"2.0.
3
"
,
"version"
:
"2.0.
4
"
,
"resolved"
:
"https://registry.npmjs.org/inherits/-/inherits-2.0.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/inherits/-/inherits-2.0.
4
.tgz"
,
"integrity"
:
"sha
1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4
="
"integrity"
:
"sha
512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=
="
},
},
"ini"
:
{
"ini"
:
{
"version"
:
"1.3.5"
,
"version"
:
"1.3.5"
,
...
@@ -650,19 +627,12 @@
...
@@ -650,19 +627,12 @@
"integrity"
:
"sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
"integrity"
:
"sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
},
"is-expression"
:
{
"is-expression"
:
{
"version"
:
"
3
.0.0"
,
"version"
:
"
4
.0.0"
,
"resolved"
:
"https://registry.npmjs.org/is-expression/-/is-expression-
3
.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/is-expression/-/is-expression-
4
.0.0.tgz"
,
"integrity"
:
"sha
1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8
="
,
"integrity"
:
"sha
512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A=
="
,
"requires"
:
{
"requires"
:
{
"acorn"
:
"~4.0.2"
,
"acorn"
:
"^7.1.1"
,
"object-assign"
:
"^4.0.1"
"object-assign"
:
"^4.1.1"
},
"dependencies"
:
{
"acorn"
:
{
"version"
:
"4.0.13"
,
"resolved"
:
"https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz"
,
"integrity"
:
"sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c="
}
}
}
},
},
"is-fullwidth-code-point"
:
{
"is-fullwidth-code-point"
:
{
...
@@ -938,18 +908,6 @@
...
@@ -938,18 +908,6 @@
"safe-buffer"
:
"5.2.1"
,
"safe-buffer"
:
"5.2.1"
,
"sift"
:
"7.0.1"
,
"sift"
:
"7.0.1"
,
"sliced"
:
"1.0.1"
"sliced"
:
"1.0.1"
},
"dependencies"
:
{
"ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
,
"integrity"
:
"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"safe-buffer"
:
{
"version"
:
"5.2.1"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
,
"integrity"
:
"sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
}
}
}
},
},
"mongoose-legacy-pluralize"
:
{
"mongoose-legacy-pluralize"
:
{
...
@@ -993,14 +951,24 @@
...
@@ -993,14 +951,24 @@
"requires"
:
{
"requires"
:
{
"ms"
:
"2.0.0"
"ms"
:
"2.0.0"
}
}
}
}
},
},
"ms"
:
{
"ms"
:
{
"version"
:
"2.0.0"
,
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
,
"integrity"
:
"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity"
:
"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
},
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
,
"integrity"
:
"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
,
"integrity"
:
"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"needle"
:
{
"needle"
:
{
"version"
:
"2.5.2"
,
"version"
:
"2.5.2"
,
"resolved"
:
"https://registry.npmjs.org/needle/-/needle-2.5.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/needle/-/needle-2.5.2.tgz"
,
...
@@ -1215,118 +1183,116 @@
...
@@ -1215,118 +1183,116 @@
}
}
},
},
"pug"
:
{
"pug"
:
{
"version"
:
"
2
.0.0
-beta11
"
,
"version"
:
"
3
.0.0"
,
"resolved"
:
"https://registry.npmjs.org/pug/-/pug-
2
.0.0
-beta11
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug/-/pug-
3
.0.0.tgz"
,
"integrity"
:
"sha
1-Favmr1AEx+LPRhPksnRlyVRrXwE
="
,
"integrity"
:
"sha
512-inmsJyFBSHZaiGLaguoFgJGViX0If6AcfcElimvwj9perqjDpUpw79UIEDZbWFmoGVidh08aoE+e8tVkjVJPCw=
="
,
"requires"
:
{
"requires"
:
{
"pug-code-gen"
:
"^
1.1.1
"
,
"pug-code-gen"
:
"^
3.0.0
"
,
"pug-filters"
:
"^
2.1.1
"
,
"pug-filters"
:
"^
4.0.0
"
,
"pug-lexer"
:
"^
3
.0.0"
,
"pug-lexer"
:
"^
5
.0.0"
,
"pug-linker"
:
"^
2
.0.
2
"
,
"pug-linker"
:
"^
4
.0.
0
"
,
"pug-load"
:
"^
2
.0.
5
"
,
"pug-load"
:
"^
3
.0.
0
"
,
"pug-parser"
:
"^
2
.0.
2
"
,
"pug-parser"
:
"^
6
.0.
0
"
,
"pug-runtime"
:
"^
2
.0.
3
"
,
"pug-runtime"
:
"^
3
.0.
0
"
,
"pug-strip-comments"
:
"^
1
.0.
2
"
"pug-strip-comments"
:
"^
2
.0.
0
"
}
}
},
},
"pug-attrs"
:
{
"pug-attrs"
:
{
"version"
:
"
2
.0.
4
"
,
"version"
:
"
3
.0.
0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-attrs/-/pug-attrs-
2
.0.
4
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-attrs/-/pug-attrs-
3
.0.
0
.tgz"
,
"integrity"
:
"sha512-
TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ
=="
,
"integrity"
:
"sha512-
azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA
=="
,
"requires"
:
{
"requires"
:
{
"constantinople"
:
"^
3
.0.1"
,
"constantinople"
:
"^
4
.0.1"
,
"js-stringify"
:
"^1.0.
1
"
,
"js-stringify"
:
"^1.0.
2
"
,
"pug-runtime"
:
"^
2
.0.
5
"
"pug-runtime"
:
"^
3
.0.
0
"
}
}
},
},
"pug-code-gen"
:
{
"pug-code-gen"
:
{
"version"
:
"
1.1
.1"
,
"version"
:
"
3.0
.1"
,
"resolved"
:
"https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-
1.1
.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-
3.0
.1.tgz"
,
"integrity"
:
"sha
1-HPcnRO8qA56uajNAyqoRBYcSWOg
="
,
"integrity"
:
"sha
512-xJIGvmXTQlkJllq6hqxxjRWcay2F9CU69TuAuiVZgHK0afOhG5txrQOcZyaPHBvSWCU/QQOqEp5XCH94rRZpBQ=
="
,
"requires"
:
{
"requires"
:
{
"constantinople"
:
"^
3
.0.1"
,
"constantinople"
:
"^
4
.0.1"
,
"doctypes"
:
"^1.1.0"
,
"doctypes"
:
"^1.1.0"
,
"js-stringify"
:
"^1.0.
1
"
,
"js-stringify"
:
"^1.0.
2
"
,
"pug-attrs"
:
"^
2
.0.
2
"
,
"pug-attrs"
:
"^
3
.0.
0
"
,
"pug-error"
:
"^
1.3.2
"
,
"pug-error"
:
"^
2.0.0
"
,
"pug-runtime"
:
"^
2
.0.
3
"
,
"pug-runtime"
:
"^
3
.0.
0
"
,
"void-elements"
:
"^
2.0.1
"
,
"void-elements"
:
"^
3.1.0
"
,
"with"
:
"^
5
.0.0"
"with"
:
"^
7
.0.0"
}
}
},
},
"pug-error"
:
{
"pug-error"
:
{
"version"
:
"
1.3.3
"
,
"version"
:
"
2.0.0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-error/-/pug-error-
1.3.3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-error/-/pug-error-
2.0.0
.tgz"
,
"integrity"
:
"sha512-
qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWi
Q=="
"integrity"
:
"sha512-
sjiUsi9M4RAGHktC1drQfCr5C5eriu24Lfbt4s+7SykztEOwVZtbFk1RRq0tzLxcMxMYTBR+zMQaG07J/btay
Q=="
},
},
"pug-filters"
:
{
"pug-filters"
:
{
"version"
:
"
2.1.5
"
,
"version"
:
"
4.0.0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-filters/-/pug-filters-
2.1.5
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-filters/-/pug-filters-
4.0.0
.tgz"
,
"integrity"
:
"sha512-
xkw71KtrC4sxleKiq+cUlQzsiLn8pM5+vCgkChW2E6oNOzaqTSIBKIQ5cl4oheuDzvJYCTSYzRaVinMUrV4YLQ
=="
,
"integrity"
:
"sha512-
yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A
=="
,
"requires"
:
{
"requires"
:
{
"clean-css"
:
"^3.3.0"
,
"constantinople"
:
"^4.0.1"
,
"constantinople"
:
"^3.0.1"
,
"jstransformer"
:
"1.0.0"
,
"jstransformer"
:
"1.0.0"
,
"pug-error"
:
"^1.3.2"
,
"pug-error"
:
"^2.0.0"
,
"pug-walk"
:
"^1.1.5"
,
"pug-walk"
:
"^2.0.0"
,
"resolve"
:
"^1.1.6"
,
"resolve"
:
"^1.15.1"
"uglify-js"
:
"^2.6.1"
}
}
},
},
"pug-lexer"
:
{
"pug-lexer"
:
{
"version"
:
"
3.1
.0"
,
"version"
:
"
5.0
.0"
,
"resolved"
:
"https://registry.npmjs.org/pug-lexer/-/pug-lexer-
3.1
.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-lexer/-/pug-lexer-
5.0
.0.tgz"
,
"integrity"
:
"sha
1-/QhzdtSmdbT1n4/vQiiDQ06VgaI
="
,
"integrity"
:
"sha
512-52xMk8nNpuyQ/M2wjZBN5gXQLIylaGkAoTk5Y1pBhVqaopaoj8Z0iVzpbFZAqitL4RHNVDZRnJDsqEYe99Ti0A=
="
,
"requires"
:
{
"requires"
:
{
"character-parser"
:
"^2.
1.1
"
,
"character-parser"
:
"^2.
2.0
"
,
"is-expression"
:
"^
3
.0.0"
,
"is-expression"
:
"^
4
.0.0"
,
"pug-error"
:
"^
1.3.2
"
"pug-error"
:
"^
2.0.0
"
}
}
},
},
"pug-linker"
:
{
"pug-linker"
:
{
"version"
:
"
2
.0.
3
"
,
"version"
:
"
4
.0.
0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-linker/-/pug-linker-
2
.0.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-linker/-/pug-linker-
4
.0.
0
.tgz"
,
"integrity"
:
"sha
1-szH/olc33eacEntWwQ/xf652bco
="
,
"integrity"
:
"sha
512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw=
="
,
"requires"
:
{
"requires"
:
{
"pug-error"
:
"^
1.3.2
"
,
"pug-error"
:
"^
2.0.0
"
,
"pug-walk"
:
"^
1.1.2
"
"pug-walk"
:
"^
2.0.0
"
}
}
},
},
"pug-load"
:
{
"pug-load"
:
{
"version"
:
"
2
.0.
12
"
,
"version"
:
"
3
.0.
0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-load/-/pug-load-
2
.0.
12
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-load/-/pug-load-
3
.0.
0
.tgz"
,
"integrity"
:
"sha512-
UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg
=="
,
"integrity"
:
"sha512-
OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ
=="
,
"requires"
:
{
"requires"
:
{
"object-assign"
:
"^4.1.
0
"
,
"object-assign"
:
"^4.1.
1
"
,
"pug-walk"
:
"^
1.1.8
"
"pug-walk"
:
"^
2.0.0
"
}
}
},
},
"pug-parser"
:
{
"pug-parser"
:
{
"version"
:
"
2
.0.
2
"
,
"version"
:
"
6
.0.
0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-parser/-/pug-parser-
2
.0.
2
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-parser/-/pug-parser-
6
.0.
0
.tgz"
,
"integrity"
:
"sha
1-U6aAz9BQOdywwn0CkJS8SnkmibA
="
,
"integrity"
:
"sha
512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw=
="
,
"requires"
:
{
"requires"
:
{
"pug-error"
:
"^
1.3.2
"
,
"pug-error"
:
"^
2.0.0
"
,
"token-stream"
:
"0.0
.1
"
"token-stream"
:
"
1.
0.0"
}
}
},
},
"pug-runtime"
:
{
"pug-runtime"
:
{
"version"
:
"
2
.0.
5
"
,
"version"
:
"
3
.0.
0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-runtime/-/pug-runtime-
2
.0.
5
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-runtime/-/pug-runtime-
3
.0.
0
.tgz"
,
"integrity"
:
"sha512-
P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw
=="
"integrity"
:
"sha512-
GoEPcmQNnaTsePEdVA05bDpY+Op5VLHKayg08AQiqJBWU/yIaywEYv7TetC5dEQS3fzBBoyb2InDcZEg3mPTIA
=="
},
},
"pug-strip-comments"
:
{
"pug-strip-comments"
:
{
"version"
:
"
1
.0.
4
"
,
"version"
:
"
2
.0.
0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-
1
.0.
4
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-
2
.0.
0
.tgz"
,
"integrity"
:
"sha512-
i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw
=="
,
"integrity"
:
"sha512-
zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ
=="
,
"requires"
:
{
"requires"
:
{
"pug-error"
:
"^
1.3.3
"
"pug-error"
:
"^
2.0.0
"
}
}
},
},
"pug-walk"
:
{
"pug-walk"
:
{
"version"
:
"
1.1.8
"
,
"version"
:
"
2.0.0
"
,
"resolved"
:
"https://registry.npmjs.org/pug-walk/-/pug-walk-
1.1.8
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/pug-walk/-/pug-walk-
2.0.0
.tgz"
,
"integrity"
:
"sha512-
GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA
=="
"integrity"
:
"sha512-
yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ
=="
},
},
"qs"
:
{
"qs"
:
{
"version"
:
"6.5.2"
,
"version"
:
"6.5.2"
,
...
@@ -1347,6 +1313,16 @@
...
@@ -1347,6 +1313,16 @@
"http-errors"
:
"1.6.3"
,
"http-errors"
:
"1.6.3"
,
"iconv-lite"
:
"0.4.23"
,
"iconv-lite"
:
"0.4.23"
,
"unpipe"
:
"1.0.0"
"unpipe"
:
"1.0.0"
},
"dependencies"
:
{
"iconv-lite"
:
{
"version"
:
"0.4.23"
,
"resolved"
:
"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz"
,
"integrity"
:
"sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA=="
,
"requires"
:
{
"safer-buffer"
:
">= 2.1.2 < 3"
}
}
}
}
},
},
"rc"
:
{
"rc"
:
{
...
@@ -1387,12 +1363,14 @@
...
@@ -1387,12 +1363,14 @@
"safe-buffer"
:
"~5.1.1"
,
"safe-buffer"
:
"~5.1.1"
,
"string_decoder"
:
"~1.1.1"
,
"string_decoder"
:
"~1.1.1"
,
"util-deprecate"
:
"~1.0.1"
"util-deprecate"
:
"~1.0.1"
}
},
},
"regenerator-runtime"
:
{
"dependencies"
:
{
"version"
:
"0.11.1"
,
"safe-buffer"
:
{
"resolved"
:
"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz"
,
"version"
:
"5.1.2"
,
"integrity"
:
"sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
,
"integrity"
:
"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
},
"regexp-clone"
:
{
"regexp-clone"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
...
@@ -1443,9 +1421,9 @@
...
@@ -1443,9 +1421,9 @@
}
}
},
},
"safe-buffer"
:
{
"safe-buffer"
:
{
"version"
:
"5.
1.2
"
,
"version"
:
"5.
2.1
"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.
1.2
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.
2.1
.tgz"
,
"integrity"
:
"sha512-
Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g
=="
"integrity"
:
"sha512-
rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ
=="
},
},
"safer-buffer"
:
{
"safer-buffer"
:
{
"version"
:
"2.1.2"
,
"version"
:
"2.1.2"
,
...
@@ -1489,6 +1467,13 @@
...
@@ -1489,6 +1467,13 @@
"on-finished"
:
"~2.3.0"
,
"on-finished"
:
"~2.3.0"
,
"range-parser"
:
"~1.2.0"
,
"range-parser"
:
"~1.2.0"
,
"statuses"
:
"~1.4.0"
"statuses"
:
"~1.4.0"
},
"dependencies"
:
{
"ms"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
,
"integrity"
:
"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
}
},
},
"serve-static"
:
{
"serve-static"
:
{
...
@@ -1527,14 +1512,6 @@
...
@@ -1527,14 +1512,6 @@
"resolved"
:
"https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz"
,
"integrity"
:
"sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
"integrity"
:
"sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
},
"source-map"
:
{
"version"
:
"0.4.4"
,
"resolved"
:
"https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz"
,
"integrity"
:
"sha1-66T12pwNyZneaAMti092FzZSA2s="
,
"requires"
:
{
"amdefine"
:
">=0.0.4"
}
},
"sparse-bitfield"
:
{
"sparse-bitfield"
:
{
"version"
:
"3.0.3"
,
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz"
,
...
@@ -1565,6 +1542,13 @@
...
@@ -1565,6 +1542,13 @@
"integrity"
:
"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="
,
"integrity"
:
"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="
,
"requires"
:
{
"requires"
:
{
"safe-buffer"
:
"~5.1.0"
"safe-buffer"
:
"~5.1.0"
},
"dependencies"
:
{
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"resolved"
:
"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
,
"integrity"
:
"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
}
},
},
"strip-ansi"
:
{
"strip-ansi"
:
{
...
@@ -1595,14 +1579,14 @@
...
@@ -1595,14 +1579,14 @@
}
}
},
},
"to-fast-properties"
:
{
"to-fast-properties"
:
{
"version"
:
"
1
.0.
3
"
,
"version"
:
"
2
.0.
0
"
,
"resolved"
:
"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-
1
.0.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-
2
.0.
0
.tgz"
,
"integrity"
:
"sha1-
uDVx+k2MJbguIxsG46MFXeTKGkc
="
"integrity"
:
"sha1-
3F5pjL0HkmW8c+A3doGk5Og/YW4
="
},
},
"token-stream"
:
{
"token-stream"
:
{
"version"
:
"0.0
.1
"
,
"version"
:
"
1.
0.0"
,
"resolved"
:
"https://registry.npmjs.org/token-stream/-/token-stream-0.0.
1.
tgz"
,
"resolved"
:
"https://registry.npmjs.org/token-stream/-/token-stream-
1.
0.0.tgz"
,
"integrity"
:
"sha1-z
u78cXp2xDFvEm0LnbqlXX598Bo
="
"integrity"
:
"sha1-z
CAOqyYT9BZtJ/+a/HylbUnfbrQ
="
},
},
"type-is"
:
{
"type-is"
:
{
"version"
:
"1.6.18"
,
"version"
:
"1.6.18"
,
...
@@ -1657,9 +1641,9 @@
...
@@ -1657,9 +1641,9 @@
"integrity"
:
"sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
"integrity"
:
"sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
},
"void-elements"
:
{
"void-elements"
:
{
"version"
:
"
2.0.1
"
,
"version"
:
"
3.1.0
"
,
"resolved"
:
"https://registry.npmjs.org/void-elements/-/void-elements-
2.0.1
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/void-elements/-/void-elements-
3.1.0
.tgz"
,
"integrity"
:
"sha1-
wGavtYK7HLQSjWDqkjkulNXp2+w
="
"integrity"
:
"sha1-
YU9/v42AHwu18GYfWy9XhXUOTwk
="
},
},
"wide-align"
:
{
"wide-align"
:
{
"version"
:
"1.1.3"
,
"version"
:
"1.1.3"
,
...
@@ -1675,12 +1659,14 @@
...
@@ -1675,12 +1659,14 @@
"integrity"
:
"sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
"integrity"
:
"sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
},
},
"with"
:
{
"with"
:
{
"version"
:
"5.1.1"
,
"version"
:
"7.0.2"
,
"resolved"
:
"https://registry.npmjs.org/with/-/with-5.1.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/with/-/with-7.0.2.tgz"
,
"integrity"
:
"sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4="
,
"integrity"
:
"sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w=="
,
"requires"
:
{
"requires"
:
{
"acorn"
:
"^3.1.0"
,
"@babel/parser"
:
"^7.9.6"
,
"acorn-globals"
:
"^3.0.0"
"@babel/types"
:
"^7.9.6"
,
"assert-never"
:
"^1.2.1"
,
"babel-walk"
:
"3.0.0-canary-5"
}
}
},
},
"wordwrap"
:
{
"wordwrap"
:
{
...
...
server/package.json
View file @
0ffaebc2
{
{
"name"
:
"
learn-express
"
,
"name"
:
"
server
"
,
"version"
:
"0.0.0"
,
"version"
:
"0.0.0"
,
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
...
@@ -15,8 +15,9 @@
...
@@ -15,8 +15,9 @@
"express"
:
"~4.16.1"
,
"express"
:
"~4.16.1"
,
"http-errors"
:
"~1.6.3"
,
"http-errors"
:
"~1.6.3"
,
"jsonwebtoken"
:
"^8.5.1"
,
"jsonwebtoken"
:
"^8.5.1"
,
"mongoose"
:
"^5.10.6"
,
"morgan"
:
"~1.9.1"
,
"morgan"
:
"~1.9.1"
,
"pug"
:
"
2
.0.0
-beta11
"
,
"pug"
:
"
^3
.0.0"
,
"react"
:
"^16.13.1"
"react"
:
"^16.13.1"
}
}
}
}
server/routes/login.js
0 → 100644
View file @
0ffaebc2
const
express
=
require
(
'
express
'
);
const
User
=
require
(
'
../schemas/user
'
);
const
bcrypt
=
require
(
"
bcrypt
"
);
const
jwt
=
require
(
'
jsonwebtoken
'
);
const
router
=
express
.
Router
();
router
.
get
(
'
/
'
,
function
(
req
,
res
,
next
)
{
console
.
log
(
'
/login get request
'
,
req
.
body
)
User
.
find
({})
.
then
((
signups
)
=>
{
res
.
json
(
signups
);
})
.
catch
((
err
)
=>
{
console
.
error
(
err
);
next
(
err
);
});
});
router
.
post
(
'
/
'
,
function
(
req
,
res
,
next
)
{
console
.
log
(
'
/login post request
'
,
req
.
body
)
User
.
findOne
({
id
:
req
.
body
.
id
},
'
id password
'
,
function
(
err
,
users
)
{
if
(
err
)
return
res
.
status
(
500
).
json
({
error
:
err
});
if
(
!
users
)
{
return
res
.
status
(
404
).
json
({
error
:
'
해당 아이디가 존재하지 않습니다.
'
});
}
bcrypt
.
compare
(
req
.
body
.
password
,
users
.
password
,
function
(
err
,
result
)
{
if
(
err
)
{
console
.
log
(
err
)
return
res
.
status
(
500
).
json
({
error
:
err
});
}
if
(
result
)
{
const
token
=
jwt
.
sign
({
id
:
users
.
id
,
},
process
.
env
.
JWT_SECRET
,
{
expiresIn
:
'
10m
'
,
// 12시간
});
return
res
.
status
(
201
).
json
({
token
,
users
,
});
}
res
.
status
(
404
).
json
({
error
:
'
비밀번호를 다시 입력해주세요.
'
});
});
})
});
module
.
exports
=
router
;
server/routes/middlewares.js
0 → 100644
View file @
0ffaebc2
const
jwt
=
require
(
'
jsonwebtoken
'
);
exports
.
isLoggedIn
=
(
req
,
res
,
next
)
=>
{
if
(
req
.
isAuthenticated
())
{
next
();
}
else
{
res
.
status
(
403
).
send
(
'
로그인 필요
'
);
}
};
exports
.
isNotLoggedIn
=
(
req
,
res
,
next
)
=>
{
if
(
!
req
.
isAuthenticated
())
{
next
();
}
else
{
res
.
redirect
(
'
/
'
);
}
};
exports
.
verifyToken
=
(
req
,
res
,
next
)
=>
{
try
{
req
.
decoded
=
jwt
.
verify
(
req
.
headers
.
authorization
,
process
.
env
.
JWT_SECRET
);
console
.
log
(
'
decode
'
,
req
.
decoded
)
return
next
();
}
catch
(
error
)
{
if
(
error
.
name
===
'
TokenExpiredError
'
)
{
// 유효기간 초과
return
res
.
status
(
419
).
json
({
code
:
419
,
error
:
'
토큰이 만료되었습니다. 다시 로그인 해주세요.
'
,
});
}
return
res
.
status
(
401
).
json
({
code
:
401
,
error
:
'
유효하지 않은 토큰입니다. 다시 로그인 해주세요.
'
,
});
}
};
server/schemas/index.js
View file @
0ffaebc2
...
@@ -6,7 +6,7 @@ module.exports = () => {
...
@@ -6,7 +6,7 @@ module.exports = () => {
mongoose
.
set
(
'
debug
'
,
true
);
mongoose
.
set
(
'
debug
'
,
true
);
}
}
mongoose
.
connect
(
'
mongodb://cherry:1q2w3e4r@localhost:27017/admin
'
,
{
mongoose
.
connect
(
'
mongodb://cherry:1q2w3e4r@localhost:27017/admin
'
,
{
dbName
:
'
ku_rental
'
,
dbName
:
'
ku_rental
'
,
useNewUrlParser
:
true
,
useUnifiedTopology
:
true
,
},
(
error
)
=>
{
},
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
'
몽고디비 연결 에러
'
,
error
);
console
.
log
(
'
몽고디비 연결 에러
'
,
error
);
...
...
server/views/error.pug
0 → 100644
View file @
0ffaebc2
extends layout
block content
h1= message
h2= error.status
pre #{error.stack}
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment