Toggle navigation
Toggle navigation
This project
Loading...
Sign in
손희승
/
OSS
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Authored by
Dexter Jin
2019-04-17 22:29:10 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
36873ddb14425003760fbdf24ec56d15108bc7ad
36873ddb
1 parent
3ba1e9f0
Experiments09 Updated
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
Experiments/experiments09/assignments/assignment01/app.js
Experiments/experiments09/assignments/assignment02/app.js
Experiments/experiments09/assignments/assignment01/app.js
View file @
36873dd
...
...
@@ -9,21 +9,26 @@ app.use(bodyParser.json());
var
books
=
new
Array
();
app
.
get
(
'/book/:bookId'
,
function
(
req
,
res
)
{
// Get book information
var
bookId
=
req
.
params
.
bookId
;
console
.
log
(
books
[
bookId
]);
res
.
send
(
books
[
bookId
]);
});
app
.
post
(
'/book'
,
function
(
req
,
res
)
{
// Create book information
books
[
req
.
body
.
id
]
=
[
req
.
body
.
id
,
req
.
body
.
name
,
req
.
body
.
price
,
req
.
body
.
author
];
})
app
.
put
(
'/book/:bookId'
,
function
(
req
,
res
)
{
// Update book information
})
app
.
post
(
'/book'
,
function
(
req
,
res
)
{
// Create book information
})
app
.
delete
(
'/book/:bookId'
,
function
(
req
,
res
)
{
// Delete book information
})
var
server
=
app
.
listen
(
23023
);
var
server
=
app
.
listen
(
80
);
console
.
log
(
books
);
...
...
Experiments/experiments09/assignments/assignment02/app.js
View file @
36873dd
...
...
@@ -38,4 +38,4 @@ app.get('/user/:userId', auth,function (req, res) {
// get User Information
res
.
send
(
"OK"
);
});
var
server
=
app
.
listen
(
23023
);
var
server
=
app
.
listen
(
80
);
...
...
Please
register
or
login
to post a comment