Toggle navigation
Toggle navigation
This project
Loading...
Sign in
I_Jemin
/
Node-Study
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
I_Jemin
2018-03-23 21:24:14 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a1ba2083f1d60f8088629b4e1ad1178c312a5906
a1ba2083
1 parent
b45f5198
Route Parameters
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
express-demo/index.js
express-demo/index.js
View file @
a1ba208
...
...
@@ -15,6 +15,14 @@ app.get('/api/courses',(req,res) => {
res
.
send
([
1
,
2
,
3
]);
});
app
.
get
(
'/api/courses/:id'
,(
req
,
res
)
=>
{
res
.
send
(
req
.
params
.
id
);
});
app
.
get
(
'/api/courses/:year/:month'
,(
req
,
res
)
=>
{
res
.
send
(
req
.
query
);
});
// PORT
const
port
=
process
.
env
.
PORT
||
3000
;
...
...
Please
register
or
login
to post a comment