
nextjs 버전이 올라가면서 유용한 기능들이 많이 생겨나고 있다. 여기서 사용해볼 Rewrite에 대해 알아보자. 원리는 간단하다. 나는 /api/hanpy로 들어오는 요청을 처리하는 API를 만들었다. 그런데, /hanpy로 들어오는 요청도 /api/hanpy의 로직을 따르게 만들고 싶은 경우가 있을 것이다. 이때 사용하는 것이 Rewrite이다. 0. 사용 준비 npx를 통해 프로젝트 하나를 생성하자. $ npx create-next-app@latest 1. rewrite 설정하기 npx를 통해 프로젝트 하나를 생성하자. 위와 같이 프로젝트를 만들면, 기본 next.config.js는 아래와 같다. /** @type {import('next').NextConfig} */ const nextConfi..
Web/nextjs
2022. 11. 27. 23:30
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Vue
- logout
- TensorFlow
- BFS
- typescript
- NextJS
- Python
- pandas
- react autoFocus
- 클라우데라
- next.config.js
- mongoDB
- django
- nextjs autoFocus
- Express
- react
- vuejs
- 자료구조
- nodejs
- Deque
- useHistory 안됨
- error:0308010C:digital envelope routines::unsupported
- login
- UserCreationForm
- 자연어처리
- read_csv
- Queue
- JavaScript
- useState
- DFS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함