Skip to content

Commit

Permalink
[ADD] : 2차세미나과제 level2, 3
Browse files Browse the repository at this point in the history
  • Loading branch information
junjuning committed Dec 24, 2021
1 parent 67920ea commit f8ddab7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
15 changes: 15 additions & 0 deletions 2nd-seminar/practice/routes/api/blog/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const express = require('express');
const router = express.Router();


router.post('/post', (req, res) => {
const result = {
status: 200,
message: 'lv3.api/blog/post',
};
res.status(200).send(result);
});



module.exports = router;
3 changes: 3 additions & 0 deletions 2nd-seminar/practice/routes/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ router.get("/", (req, res)=>{
res.status(200).send(result);
});

router.use("/blog", require("./blog"));
router.use("/users", require("./users"));

module.exports=router;
20 changes: 20 additions & 0 deletions 2nd-seminar/practice/routes/api/users/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var express = require('express');
var router = express.Router();

router.get('/login', function(req, res) {
const result = {
status : 200,
message : "lv3.api/users/login"
}
res.status(200).send(result);
});

router.get('/signup', function(req, res) {
const result = {
status : 200,
message : "lv3.api/users/signup"
}
res.status(200).send(result);
});

module.exports = router;
2 changes: 1 addition & 1 deletion 2nd-seminar/practice/routes/users.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var express = require('express');
var router = express.Router();

/* GET users listing. */

router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
Expand Down

0 comments on commit f8ddab7

Please sign in to comment.