Showing
1 changed file
with
8 additions
and
0 deletions
| ... | @@ -15,6 +15,14 @@ app.get('/api/courses',(req,res) => { | ... | @@ -15,6 +15,14 @@ app.get('/api/courses',(req,res) => { |
| 15 | res.send([1,2,3]); | 15 | res.send([1,2,3]); |
| 16 | }); | 16 | }); |
| 17 | 17 | ||
| 18 | +app.get('/api/courses/:id',(req,res) => { | ||
| 19 | + res.send(req.params.id); | ||
| 20 | +}); | ||
| 21 | + | ||
| 22 | +app.get('/api/courses/:year/:month',(req,res) => { | ||
| 23 | + res.send(req.query); | ||
| 24 | +}); | ||
| 25 | + | ||
| 18 | // PORT | 26 | // PORT |
| 19 | const port = process.env.PORT || 3000; | 27 | const port = process.env.PORT || 3000; |
| 20 | 28 | ... | ... |
-
Please register or login to post a comment