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
59155c79
Commit
59155c79
authored
Sep 24, 2020
by
Lee Jin Ju
Browse files
병합전 푸쉬
parent
4380ffe4
Changes
5
Show whitespace changes
Inline
Side-by-side
server/app.js
View file @
59155c79
...
@@ -6,15 +6,17 @@ var logger = require('morgan');
...
@@ -6,15 +6,17 @@ var logger = require('morgan');
var
indexRouter
=
require
(
'
./routes/index
'
);
var
indexRouter
=
require
(
'
./routes/index
'
);
var
usersRouter
=
require
(
'
./routes/users
'
);
var
usersRouter
=
require
(
'
./routes/users
'
);
const
{
connect
}
=
require
(
'
http2
'
);
var
app
=
express
();
var
app
=
express
();
connect
();
const
port
=
3030
;
const
port
=
3030
;
app
.
listen
(
port
,
()
=>
console
.
log
(
port
));
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');
app
.
use
(
logger
(
'
dev
'
));
app
.
use
(
logger
(
'
dev
'
));
app
.
use
(
express
.
json
());
app
.
use
(
express
.
json
());
...
...
server/schemas/index.js
View file @
59155c79
...
@@ -5,7 +5,7 @@ module.exports = () => {
...
@@ -5,7 +5,7 @@ module.exports = () => {
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
mongoose
.
set
(
'
debug
'
,
true
);
mongoose
.
set
(
'
debug
'
,
true
);
}
}
mongoose
.
connect
(
'
mongodb://
rkyoung7:rkdud127
@localhost:27017/admin
'
,
{
mongoose
.
connect
(
'
mongodb://
hijinju:highlight
@localhost:27017/admin
'
,
{
dbName
:
'
KU_Rental
'
,
dbName
:
'
KU_Rental
'
,
},
(
error
)
=>
{
},
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
...
...
server/views/error.pug
deleted
100644 → 0
View file @
4380ffe4
extends layout
block content
h1= message
h2= error.status
pre #{error.stack}
server/views/index.pug
deleted
100644 → 0
View file @
4380ffe4
extends layout
block content
h1= title
p Welcome to #{title}
server/views/layout.pug
deleted
100644 → 0
View file @
4380ffe4
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
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