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
48925fcb
Commit
48925fcb
authored
Sep 25, 2020
by
Lee Jin Ju
Browse files
Merge remote-tracking branch 'origin/kimpen' into hijinju
parents
b9687379
0e979e43
Changes
9
Show whitespace changes
Inline
Side-by-side
server/app.js
View file @
48925fcb
var
createError
=
require
(
'
http-errors
'
);
var
express
=
require
(
'
express
'
);
var
path
=
require
(
'
path
'
);
var
cookieParser
=
require
(
'
cookie-parser
'
);
var
logger
=
require
(
'
morgan
'
);
var
indexRouter
=
require
(
'
./routes/index
'
);
var
usersRouter
=
require
(
'
./routes/users
'
);
// const createError = require('http-errors');
const
express
=
require
(
'
express
'
);
const
path
=
require
(
'
path
'
);
const
cookieParser
=
require
(
'
cookie-parser
'
);
const
logger
=
require
(
'
morgan
'
);
const
port
=
3030
;
require
(
'
dotenv
'
).
config
();
const
indexRouter
=
require
(
'
./routes/index
'
);
const
usersRouter
=
require
(
'
./routes/users
'
);
const
connect
=
require
(
'
./schemas
'
);
var
app
=
express
();
const
app
=
express
();
connect
();
const
port
=
3030
;
app
.
listen
(
port
,
()
=>
console
.
log
(
port
));
// view engine setup
// app.set('views', path.join(__dirname, 'views'));
// app.set('view engine', 'pug');
...
...
@@ -21,12 +20,14 @@ app.listen(port, () => console.log(port));
app
.
use
(
logger
(
'
dev
'
));
app
.
use
(
express
.
json
());
app
.
use
(
express
.
urlencoded
({
extended
:
false
}));
app
.
use
(
cookieParser
());
app
.
use
(
cookieParser
(
process
.
env
.
JWT_SECRET
));
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'
public
'
)));
app
.
use
(
'
/
'
,
indexRouter
);
app
.
use
(
'
/users
'
,
usersRouter
);
app
.
listen
(
port
,
()
=>
console
.
log
(
port
));
// catch 404 and forward to error handler
app
.
use
(
function
(
req
,
res
,
next
)
{
next
(
createError
(
404
));
...
...
@@ -40,7 +41,7 @@ app.use(function(err, req, res, next) {
// render the error page
res
.
status
(
err
.
status
||
500
);
res
.
render
(
'
error
'
);
//
res.render('error');
});
module
.
exports
=
app
;
server/client/package-lock.json
View file @
48925fcb
...
...
@@ -67,6 +67,13 @@
"@babel/types": "^7.11.5",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
},
"dependencies": {
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
}
}
},
"@babel/helper-annotate-as-pure": {
...
...
server/client/package.json
View file @
48925fcb
...
...
@@ -9,11 +9,8 @@
"axios"
:
"^0.20.0"
,
"bootstrap"
:
"^4.5.2"
,
"formik"
:
"^2.1.5"
,
<<<<<<<
HEAD
"jquery"
:
"^3.5.1"
,
"popper.js"
:
"^1.16.1"
,
=======
>>>>>>>
origin/rkyoung
7
"react"
:
"^16.13.1"
,
"react-dom"
:
"^16.13.1"
,
"react-router-dom"
:
"^5.2.0"
,
...
...
@@ -25,13 +22,9 @@
"start"
:
"react-scripts start"
,
"build"
:
"react-scripts build"
,
"test"
:
"react-scripts test"
,
<<<<<<<
HEAD
"eject"
:
"react-scripts eject"
,
"proxy"
:
"http://localhost:3030"
=======
"eject"
:
"react-scripts eject"
>>>>>>>
origin/rkyoung
7
},
"proxy"
:
"http://localhost:3030"
,
"eslintConfig"
:
{
"extends"
:
"react-app"
},
...
...
server/client/src/Pages/LoginPage.js
View file @
48925fcb
...
...
@@ -11,7 +11,6 @@ const Logo = styled.div`
background-color: #E76A6A;
`
function
Login
()
{
return
(
<
div
className
=
"
container-fluid
"
>
...
...
server/client/src/Pages/SignupPage.js
View file @
48925fcb
server/client/src/index.js
View file @
48925fcb
import
React
from
'
react
'
;
import
ReactDOM
from
'
react-dom
'
;
import
*
as
serviceWorker
from
'
./serviceWorker
'
;
import
{
BrowserRouter
as
Router
,
Route
,
Redirect
,
Switch
}
from
'
react-router-dom
'
;
import
*
as
serviceWorker
from
'
./serviceWorker
'
;
import
'
bootstrap
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
import
Login
from
'
./Pages/LoginPage
'
;
...
...
server/schemas/index.js
View file @
48925fcb
...
...
@@ -20,9 +20,10 @@ module.exports = () => {
console
.
error
(
'
몽고디비 연결 에러
'
,
error
);
});
mongoose
.
connection
.
on
(
'
disconnected
'
,
()
=>
{
console
.
error
(
'
몽고디비 연결이 끊겼습니다. 연결을재시도합니다.
'
);
console
.
error
(
'
몽고디비 연결이 끊겼습니다. 연결을
재시도합니다.
'
);
connect
();
});
require
(
'
./user
'
);
require
(
'
./reserve
'
);
};
server/schemas/reserve.js
View file @
48925fcb
...
...
@@ -7,38 +7,28 @@ const reserveSchema = new Schema({
},
time
:
{
type
:
String
,
},
room
:{
type
:
String
,
},
name
:
{
//대표자 이름
type
:
String
,
},
id
:{
type
:
Number
,
},
reason
:
{
type
:
String
,
},
member
:
{
type
:
String
,
},
approve
:
{
type
:
Boolean
,
},
num
:
{
type
:
Number
,
},
}
});
module
.
exports
=
mongoose
.
model
(
'
Reserve
'
,
reserveSchema
);
server/schemas/user.js
View file @
48925fcb
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