Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- full
- 6ixsense
- MySQL
- PlaceHolder
- nestjs
- GitHub
- 1차 프로젝트
- INCENSE
- Branch
- AWSOME DAY
- 조인
- then
- 회고록
- JavaScript
- Merge
- aws
- Git
- 콜백함수
- EC2
- math함수
- increment
- 온라인 컨퍼런스
- 트랜잭션
- graphql
- inner
- docker
- 위코드
- Join
- typescript
- 보안 그룹 규칙
Archives
- Today
- Total
코딩 쏙쏙
2. router 본문
router란? 서로 다른 네트워크들을 연결해주는 장치
router 폴더의 index.js의 코드들을 보시면
//routes/commentRouter.js
const express = require("express");
const commentController = require("../controllers/commentController");
const router = express.Router();
router.post("/product", commentController.product);
module.exports = {
router,
};
내가 가지고 있는 usersRouter, postsRouter, likerRouter, commentRouter 각자의 위치의 데이터로 보내준다.
※ 계속 수정될 예정 입니다. ※
'[Dev_Study]' 카테고리의 다른 글
Session & Cookie 특징, 차이점 (0) | 2023.04.02 |
---|---|
인증(Authentication) & 인가, Session & Cookie (0) | 2023.04.02 |
개발 공부(2)_암호화의 종류 (0) | 2023.04.02 |
1. Layered (0) | 2023.03.27 |
개발공부(1)_MySQL 개념 (0) | 2023.03.27 |