- FastAPI + PostgreSQL + Redis, web·worker 분리, compose 에 backend·worker·postgres·redis 추가 - 기상청 단기·초단기·중기·특보, 에어코리아, Open-Meteo, TourAPI, 특일정보 연동 (첫 조회 때 받고 캐시) - 매일 03:00 worker 가 전국 공통 피드 칸을 정하고 지난 데이터를 정리 - 시드: 시군구 256곳, 지수 23개, 노을 대표 지점·명소, 데이트 명소, 읽을거리 - pytest 66개 (테스트 전용 DB·Redis 사용) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
315 lines
19 KiB
HTML
315 lines
19 KiB
HTML
<title>날씨각 API 목록</title>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=IBM+Plex+Sans+KR:wght@400;600&family=IBM+Plex+Mono:wght@400&display=swap">
|
|
<style>
|
|
/* 한 단 문서: 공통 규칙 → 화면별 API 표 → 응답 예시 → 프론트 타입 자동 생성 → 정할 것 */
|
|
:root{
|
|
--bg:#f6f7fa; --fg:#1d2330; --muted:#404a5b; --line:#d6dbe5; --soft:#eaeef5; --accent:#2b56a0; --warn:#8f3c17;
|
|
--display:"Gowun Dodum","Apple SD Gothic Neo",sans-serif;
|
|
--body:"IBM Plex Sans KR","Apple SD Gothic Neo","Malgun Gothic",sans-serif;
|
|
--mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
|
|
}
|
|
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--bg:#12161e;--fg:#e4e8f0;--muted:#a9b3c4;--line:#2b3342;--soft:#19202b;--accent:#93b5ef;--warn:#f0a07a;color-scheme:dark}}
|
|
:root[data-theme="dark"]{--bg:#12161e;--fg:#e4e8f0;--muted:#a9b3c4;--line:#2b3342;--soft:#19202b;--accent:#93b5ef;--warn:#f0a07a;color-scheme:dark}
|
|
body{background:var(--bg);color:var(--fg);font-family:var(--body);font-size:14.5px;line-height:1.65}
|
|
main{max-width:1080px;margin:0 auto;padding-inline:20px;padding-block:32px 72px;display:flex;flex-direction:column;gap:32px}
|
|
h1{font-family:var(--display);font-size:30px;margin:0;text-wrap:balance}
|
|
h2{font-family:var(--display);font-size:22px;margin:0 0 10px;text-wrap:balance}
|
|
h3{font-size:15px;margin:16px 0 6px}
|
|
p,li{max-width:76ch}
|
|
p{margin:0 0 8px}
|
|
ol,ul{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:5px}
|
|
.sub{color:var(--muted)}
|
|
code{font-family:var(--mono);font-size:12.5px;background:var(--soft);padding:2px 6px;border-radius:3px}
|
|
pre{font-family:var(--mono);font-size:12.5px;line-height:1.55;background:var(--soft);border:1px solid var(--line);border-radius:6px;padding:14px 16px;overflow-x:auto;margin:0}
|
|
.wrap{overflow-x:auto;border:1px solid var(--line);border-radius:6px}
|
|
table{border-collapse:collapse;width:100%;min-width:760px}
|
|
th,td{text-align:left;vertical-align:top;padding:9px 11px;border-bottom:1px solid var(--line)}
|
|
th{background:var(--soft);font-size:12.5px;font-weight:600;letter-spacing:.02em;white-space:nowrap}
|
|
tr:last-child td{border-bottom:0}
|
|
td.m{font-family:var(--mono);font-size:12.5px;white-space:nowrap}
|
|
.lock{color:var(--warn);font-weight:600;white-space:nowrap}
|
|
</style>
|
|
<main>
|
|
<header>
|
|
<h1>날씨각 API 목록</h1>
|
|
<p class="sub">3단계 · 2026-10-01 · 기준 화면: 시안 B 피드 (탭 5개: 오늘 · 각 · 노을 · 주말·행사 · 계절·상식)</p>
|
|
</header>
|
|
|
|
<section>
|
|
<h2>공통 규칙 (o2o-site-AEO와 같음)</h2>
|
|
<ul>
|
|
<li>주소는 <code>/v1/{도메인}/{동작}</code> 형식입니다. 조회는 GET, 변경은 POST·DELETE를 씁니다.</li>
|
|
<li>모든 응답에 <code>result: {success, code, desc}</code>가 들어갑니다. 값이 없는 필드(None)는 응답에서 빠집니다.</li>
|
|
<li>id는 모두 숫자입니다. 지수·읽을거리는 영문 <code>code</code>(예: <code>yajang</code>)를 따로 줘서 아이콘·공유 주소에 씁니다.</li>
|
|
<li>구는 항상 <code>region</code>(행정코드)으로 지정합니다. 예: 마포구 <code>1144000000</code></li>
|
|
<li>시각은 ISO 8601 형식(KST <code>+09:00</code>)으로 주고, 날짜는 <code>YYYY-MM-DD</code>로 줍니다.</li>
|
|
<li>화면 문장은 서버가 만들어서 줍니다. 색·그라데이션·아이콘 그림은 프론트가 정하고, 서버는 <code>icon</code> 이름이나 종류 코드만 줍니다.</li>
|
|
<li><span class="lock">로그인</span> 표시가 있는 API는 <code>Authorization: Bearer {access}</code> 헤더가 필요합니다.</li>
|
|
</ul>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>화면별 API</h2>
|
|
<div class="wrap"><table>
|
|
<tr><th>화면</th><th>메서드 · 주소</th><th>요청</th><th>응답 요약</th></tr>
|
|
<tr><td>공통</td><td class="m">GET /healthz</td><td>—</td><td>서버 기동 시각</td></tr>
|
|
<tr><td>공통</td><td class="m">GET /v1/region/list</td><td><code>q</code>(검색어, 선택)</td><td>구 목록 <code>code, name, short_name</code></td></tr>
|
|
<tr><td>공통</td><td class="m">GET /v1/region/nearest</td><td><code>lat, lon</code></td><td>가장 가까운 구 1개</td></tr>
|
|
<tr><td>오늘</td><td class="m">GET /v1/feed</td><td><code>region</code></td><td>하늘 영역, 오늘의 각 줄, 오늘 피드 전부(전국 공통 칸·순서에 그 구 내용을 채움), 피드 사이 띠</td></tr>
|
|
<tr><td>오늘</td><td class="m">GET /v1/weather/today</td><td><code>region</code></td><td>오늘 3시간 칸 8개(0·3·6…21시): 기온·체감·하늘·비·아이콘·낮/밤/노을·한 줄 메모, 위 한 줄. 피드 "오늘 날씨" 포스트 첫 슬라이드에 씀</td></tr>
|
|
<tr><td>오늘</td><td class="m">GET /v1/weather/now</td><td><code>region</code></td><td>지금 비 올까: 앞으로 2시간 비(초단기예보), 내일 비 시작 시각·출근 8시·퇴근 7시, 가까운 측정소 미세먼지, 지금 내려진 특보(받지 못했으면 빠짐). 피드 "오늘 날씨" 포스트 2·3번째 슬라이드와 하늘 영역 "지금 비"에 씀</td></tr>
|
|
<tr><td>오늘</td><td class="m">GET /v1/feed/post/{post_id}</td><td>—</td><td>포스트 1개 (공유 링크로 들어왔을 때)</td></tr>
|
|
<tr><td>각</td><td class="m">GET /v1/index/list</td><td><code>region</code>, <code>category</code>(선택: 1 밖에서 놀기·2 먹고 마시기·3 집안일·4 생활 고민), <code>core</code>(가을 각만)</td><td>오늘 날씨 점수(<code>weather_score</code>), 1~3위, 지수 전체(점수순, 순위, 한 줄, 오늘·내일·모레 점수)</td></tr>
|
|
<tr><td>각</td><td class="m">GET /v1/index/{index_id}</td><td><code>region</code></td><td>계산 근거: 6요소 값·비중·문장, 0점 조건, 반영 못 한 것</td></tr>
|
|
<tr><td>노을</td><td class="m">GET /v1/sky</td><td><code>region</code></td><td>오늘 점수·등급·확신, 3컷 시각, 해 지는 방향, 가까운 명소, 앞으로 3일</td></tr>
|
|
<tr><td>노을</td><td class="m">GET /v1/sky/ranking</td><td><code>date</code>(선택)</td><td>전국 노을 순위 (대표 30곳)</td></tr>
|
|
<tr><td>주말·행사</td><td class="m">GET /v1/week</td><td><code>region</code></td><td>7일 날씨 (요일, 공휴일, 아이콘, 최고, 요약, 추천)</td></tr>
|
|
<tr><td>주말·행사</td><td class="m">GET /v1/week/place/list</td><td><code>region</code>, <code>date</code>, <code>area</code>(선택)</td><td>데이트 명소. 그날 비가 오면 실내를, 맑으면 야외를 먼저</td></tr>
|
|
<tr><td>주말·행사</td><td class="m">GET /v1/week/event/list</td><td><code>region</code>, <code>area</code>(선택)</td><td>축제·행사, 그날 날씨와 맞는지 한 줄</td></tr>
|
|
<tr><td>계절·상식</td><td class="m">GET /v1/season/week</td><td>—</td><td>이번 주 특집: 주차, 제목, 시, 지금 절기·다음 절기</td></tr>
|
|
<tr><td>계절·상식</td><td class="m">GET /v1/season/article/list</td><td><code>category</code>(선택: season·tip·gak)</td><td>읽을거리 목록</td></tr>
|
|
<tr><td>계절·상식</td><td class="m">GET /v1/season/article/{article_id}</td><td>—</td><td>읽을거리 본문</td></tr>
|
|
<tr><td>로그인</td><td class="m">POST /v1/auth/signup</td><td><code>login_id</code>(영문 소문자·숫자·_ 4~20), <code>password</code>(8자 이상), <code>nickname</code>(2~12자). 구글 로그인은 이번에 뺌</td><td>access·refresh 토큰</td></tr>
|
|
<tr><td>로그인</td><td class="m">POST /v1/auth/login</td><td><code>login_id, password</code></td><td>access·refresh 토큰</td></tr>
|
|
<tr><td>로그인</td><td class="m">POST /v1/auth/refresh</td><td><code>refresh_token</code></td><td>새 access 토큰</td></tr>
|
|
<tr><td>로그인</td><td class="m">GET /v1/auth/me</td><td><span class="lock">로그인</span></td><td>닉네임, 로그인 방식</td></tr>
|
|
<tr><td>반응</td><td class="m">POST · DELETE /v1/reaction/post/{post_id}/like</td><td><span class="lock">로그인</span></td><td>좋아요 수, 내가 눌렀는지</td></tr>
|
|
<tr><td>반응</td><td class="m">POST · DELETE /v1/reaction/post/{post_id}/save</td><td><span class="lock">로그인</span></td><td>저장 여부</td></tr>
|
|
<tr><td>반응</td><td class="m">GET /v1/reaction/save/list</td><td><span class="lock">로그인</span> <code>cursor</code></td><td>내가 저장한 포스트</td></tr>
|
|
<tr><td>반응</td><td class="m">GET /v1/reaction/post/{post_id}/comment/list</td><td><code>cursor</code></td><td>댓글 목록 (로그인 없이 보기)</td></tr>
|
|
<tr><td>반응</td><td class="m">POST /v1/reaction/post/{post_id}/comment</td><td><span class="lock">로그인</span> <code>body</code> (60자)</td><td>만든 댓글</td></tr>
|
|
<tr><td>반응</td><td class="m">DELETE /v1/reaction/comment/{comment_id}</td><td><span class="lock">로그인</span> 본인 것만</td><td>—</td></tr>
|
|
<tr><td>반응</td><td class="m">POST · DELETE /v1/reaction/comment/{comment_id}/like</td><td><span class="lock">로그인</span></td><td>좋아요 수</td></tr>
|
|
<!-- 보류: <tr><td>반응</td><td class="m">POST /v1/reaction/comment/{comment_id}/report</td><td>로그인, reason (1=욕설·비하 2=광고 3=개인정보 노출 4=기타)</td><td>신고 3건이면 자동 숨김</td></tr> -->
|
|
</table></div>
|
|
<p class="sub" style="margin-top:8px">보내기(공유)는 API가 없습니다. 보낼 문구는 포스트의 <code>share_messages</code>에 들어 있고, 카카오톡·링크 복사는 프론트에서 처리합니다.</p>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>응답 예시</h2>
|
|
|
|
<h3>GET /v1/feed?region=1144000000</h3>
|
|
<pre>{
|
|
"result": {"success": true, "code": 0, "desc": "SUCCESS"},
|
|
"region": {"code": "1144000000", "name": "서울 마포구", "short_name": "마포구"},
|
|
"hero": {
|
|
"now_at": "2026-10-01T17:40:00+09:00",
|
|
"sky_mode": "sunset",
|
|
"temp_c": 21, "feels_c": 22,
|
|
"discomfort": {"value": 67, "label": "쾌적"},
|
|
"rain_2h": {"will_rain": false, "text": "2시간 없음"},
|
|
"top3": [
|
|
{"index_id": 1, "code": "yajang", "name": "야장각", "icon": "yajang", "score": 88, "rank": 1},
|
|
{"index_id": 2, "code": "picnic", "name": "피크닉", "icon": "picnic", "score": 84, "rank": 2},
|
|
{"index_id": 3, "code": "chimaek", "name": "치맥각", "icon": "chimaek", "score": 83, "rank": 3}
|
|
],
|
|
"bubble": {"who": "rabbit", "text": "퇴근하고 야장 가자!"}
|
|
},
|
|
"stories": [{"index_id": 1, "code": "yajang", "name": "야장각", "icon": "yajang", "score": 88, "rank": 1}],
|
|
"posts": [
|
|
{
|
|
"post_id": 1024, "position": 2, "post_type": "gak",
|
|
"title": "야장각 88", "icon": "yajang",
|
|
"caption": "저녁 7시 21°, 바람은 살랑, 비 없음. 오늘의 각 1위는 야장각이에요.",
|
|
"slides": [{"kind": "gak", "rank": 1, "score": 88, "name": "야장각", "line": "퇴근하고 야장 가기 딱 좋은 저녁", "summary": "저녁 7시 21°, 바람 살랑"}],
|
|
"share_messages": ["오늘 야장 어때? 🍻 야장각 88이래"],
|
|
"like_count": 389, "comment_count": 3, "liked": false, "saved": false,
|
|
"published_at": "2026-10-01T17:28:00+09:00"
|
|
},
|
|
{
|
|
"post_id": 1023, "position": 1, "post_type": "weather", "title": "오늘 하루의 날씨", "icon": "sun",
|
|
"slides": [
|
|
{"kind": "hours", "line": "낮엔 햇볕 따뜻, 저녁엔 선선해요",
|
|
"hours": [{"at": "2026-10-01T00:00:00+09:00", "icon": "stars", "temp_c": 17, "tone": "night"}]},
|
|
{"kind": "umbrella", "line": "오늘은 필요 없어요. 내일 오후 3시부터 비",
|
|
"rows": [{"label": "앞으로 2시간", "value": "비 없음"}, {"label": "내일 출근 8시", "value": "맑음 16°"}]},
|
|
{"kind": "dust", "line": "초미세먼지 11, 창문 활짝 열어도 돼요",
|
|
"rows": [{"label": "초미세먼지", "value": "11 좋음"}]}
|
|
]
|
|
}
|
|
],
|
|
"bands": {
|
|
"events": [{"event_id": 31, "name": "서울세계불꽃축제", "when": "10월 3일 토요일 밤", "status": "soon", "status_label": "이번 토요일"}],
|
|
"top5": [{"index_id": 1, "code": "yajang", "name": "야장각", "score": 88, "summary": "저녁 7시 21°, 바람 살랑"}],
|
|
"season": [{"article_id": 5, "code": "maple", "title": "설악산 첫 단풍, 절정은 언제?", "meta": "계절 소식 · 3분"}]
|
|
}
|
|
}</pre>
|
|
<p class="sub" style="margin-top:8px">슬라이드는 <code>kind</code>마다 모양이 정해져 있습니다: <code>hours</code> · <code>umbrella</code> · <code>dust</code> · <code>gak</code> · <code>sunset</code> · <code>spots</code> · <code>info</code>(계절·행사·상식) · <code>week</code>. 하루 포스트가 10개 안팎이라 나눠 받지 않고 한 번에 다 줍니다. <code>liked</code>·<code>saved</code>는 로그인했을 때만 들어갑니다.</p>
|
|
|
|
<h3>GET /v1/index/1?region=1144000000</h3>
|
|
<pre>{
|
|
"result": {"success": true, "code": 0, "desc": "SUCCESS"},
|
|
"index_id": 1, "code": "yajang", "name": "야장각", "score": 88, "rank": 1,
|
|
"description": "저녁 6시~자정, 바깥 자리에 앉기 좋은 정도",
|
|
"factors": [
|
|
{"axis": "temp", "label": "기온", "value": 92, "weight": 30, "note": "체감 21°, 편한 범위 18~24° 안"},
|
|
{"axis": "rain", "label": "비", "value": 100, "weight": 25, "note": "비 확률 0%"},
|
|
{"axis": "wind", "label": "바람", "value": 86, "weight": 15, "note": "바람 초속 2m, 전구 줄도 안 흔들려요"},
|
|
{"axis": "humidity", "label": "습도", "value": 70, "weight": 10, "note": "습도 68%, 살짝 끈적"},
|
|
{"axis": "air", "label": "공기", "value": 92, "weight": 10, "note": "초미세먼지 11, 좋음"},
|
|
{"axis": "time", "label": "시간대", "value": 78, "weight": 10, "note": "목요일 저녁이라 주말보다 조금 낮게"}
|
|
],
|
|
"zero_rules": "비 확률 80% 이상이거나 바람이 초속 14m를 넘으면 바로 0점",
|
|
"zero_reason": null,
|
|
"limit": "모기, 가게 영업 여부, 자리 경쟁은 반영하지 못해요",
|
|
"trend": [{"date": "2026-10-01", "score": 88}, {"date": "2026-10-02", "score": 30}, {"date": "2026-10-03", "score": 70}]
|
|
}</pre>
|
|
|
|
<h3>GET /v1/sky?region=1144000000</h3>
|
|
<pre>{
|
|
"result": {
|
|
"success": true,
|
|
"code": 0,
|
|
"desc": "SUCCESS"
|
|
},
|
|
"region_code": "1144000000",
|
|
"sunset_azimuth": 266,
|
|
"sunset": {
|
|
"day": "2026-10-02",
|
|
"sky_type": 1,
|
|
"score": 48,
|
|
"grade": 2,
|
|
"grade_label": "은은함",
|
|
"confidence": 1,
|
|
"best_times": [
|
|
{
|
|
"at": "2026-10-02T18:15:44.782997+09:00",
|
|
"kind": "sun",
|
|
"label": "해 져요"
|
|
},
|
|
{
|
|
"at": "2026-10-02T18:25:44.782997+09:00",
|
|
"kind": "peak",
|
|
"label": "가장 붉을 때"
|
|
},
|
|
{
|
|
"at": "2026-10-02T18:41:49.977676+09:00",
|
|
"kind": "twilight",
|
|
"label": "보랏빛 하늘"
|
|
}
|
|
]
|
|
},
|
|
"sunrise": {
|
|
"day": "2026-10-03",
|
|
"sky_type": 2,
|
|
"score": 44,
|
|
"grade": 2,
|
|
"grade_label": "은은함",
|
|
"confidence": 3,
|
|
"best_times": [
|
|
{
|
|
"at": "2026-10-03T06:02:08.797987+09:00",
|
|
"kind": "twilight",
|
|
"label": "푸른 새벽"
|
|
},
|
|
{
|
|
"at": "2026-10-03T06:09:14.395594+09:00",
|
|
"kind": "peak",
|
|
"label": "가장 붉을 때"
|
|
},
|
|
{
|
|
"at": "2026-10-03T06:28:14.395594+09:00",
|
|
"kind": "sun",
|
|
"label": "해 떠요"
|
|
}
|
|
]
|
|
},
|
|
"days": [
|
|
{
|
|
"day": "2026-10-02",
|
|
"sky_type": 1,
|
|
"score": 48,
|
|
"grade": 2,
|
|
"grade_label": "은은함",
|
|
"confidence": 1,
|
|
"best_times": [
|
|
{
|
|
"at": "2026-10-02T18:15:44.782997+09:00",
|
|
"kind": "sun",
|
|
"label": "해 져요"
|
|
},
|
|
{
|
|
"at": "2026-10-02T18:25:44.782997+09:00",
|
|
"kind": "peak",
|
|
"label": "가장 붉을 때"
|
|
},
|
|
{
|
|
"at": "2026-10-02T18:41:49.977676+09:00",
|
|
"kind": "twilight",
|
|
"label": "보랏빛 하늘"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"day": "2026-10-03",
|
|
"sky_type": 1,
|
|
"score": 48,
|
|
"grade": 2,
|
|
"grade_label": "은은함",
|
|
"confidence": 3,
|
|
"best_times": [
|
|
{
|
|
"at": "2026-10-03T18:14:13.521969+09:00",
|
|
"kind": "sun",
|
|
"label": "해 져요"
|
|
},
|
|
{
|
|
"at": "2026-10-03T18:30:13.521969+09:00",
|
|
"kind": "peak",
|
|
"label": "가장 붉을 때"
|
|
},
|
|
{
|
|
"at": "2026-10-03T18:40:19.119576+09:00",
|
|
"kind": "twilight",
|
|
"label": "보랏빛 하늘"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"spots": [
|
|
{
|
|
"no": 1,
|
|
"name": "망원한강공원",
|
|
"description": "강 건너 서쪽이 넓게 트임 · 자전거 7분",
|
|
"lat": 37.5555,
|
|
"lon": 126.895,
|
|
"distance_km": 1.5
|
|
}
|
|
]
|
|
}</pre>
|
|
|
|
<h3>GET /v1/week?region=1144000000</h3>
|
|
<pre>{
|
|
"result": {"success": true, "code": 0, "desc": "SUCCESS"},
|
|
"days": [
|
|
{"date": "2026-10-03", "weekday": "토", "holiday": "개천절", "icon": "sun", "temp_max_c": 23, "temp_min_c": 13,
|
|
"headline": "토요일 · 맑음 13~23°", "summary": "하루 종일 맑음, 피크닉각 86",
|
|
"pick": "낮엔 여의도 피크닉, 밤엔 불꽃축제", "rain_hours": null},
|
|
{"date": "2026-10-04", "weekday": "일", "holiday": null, "icon": "rain", "temp_max_c": 20, "temp_min_c": 14,
|
|
"headline": "일요일 · 오후 2시부터 비 14~20°", "summary": "오전 등산각 78, 오후는 실내",
|
|
"pick": "아침 북한산 → 오후 성수동 전시", "rain_hours": [14, 20]}
|
|
]
|
|
}</pre>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>프론트 연결 (Hey API)</h2>
|
|
<ol>
|
|
<li><b>백엔드:</b> 요청·응답을 Pydantic 모델(<code>Req_*</code>/<code>Res_*</code>)로 정의하면 FastAPI가 <code>http://localhost:9810/openapi.json</code>을 자동으로 만듭니다. Swagger는 <code>/docs</code>.</li>
|
|
<li><b>생성:</b> <code>frontend/</code>에서 <code>npm run api</code> → <code>openapi-ts.config.ts</code>가 스펙을 읽어 <code>src/api/client/</code>에 타입·SDK·TanStack Query 함수를 만듭니다. 서버 없이 뽑을 때는 <code>python backend/scripts/export_openapi.py</code> 후 <code>OPENAPI_INPUT=../backend/openapi.json npm run api</code>.</li>
|
|
<li><b>이름:</b> operationId 의 <code>_v1_</code> 앞부분을 camelCase 로 줄인다. 예: <code>get_feed_v1_feed_get</code> → <code>getFeedOptions</code>, <code>like_post_v1_…</code> → <code>likePostMutation</code>.</li>
|
|
<li><b>화면:</b> <code>useQuery(getFeedOptions({ query: { region } }))</code>, <code>useMutation(likePostMutation())</code>. 직접 <code>fetch</code> 하지 않습니다.</li>
|
|
<li><b>공통 처리:</b> <code>src/api/setup.ts</code> 가 백엔드 주소(<code>VITE_API_BASE_URL</code>), 로그인 토큰, 401 때 토큰 갱신 후 재요청을 맡습니다.</li>
|
|
<li><b>규칙:</b> 백엔드 API 를 바꾸면 <code>npm run api</code> 를 다시 실행합니다. 생성된 파일은 손으로 고치지 않습니다.</li>
|
|
</ol>
|
|
<p class="sub" style="margin-top:8px">도구 비교와 고른 이유: api-codegen.html</p>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>정할 것</h2>
|
|
<ul>
|
|
<li>구를 정하는 방법: 사용자가 고르기만 할지, 위치로 가장 가까운 구를 찾는 것(<code>/v1/region/nearest</code>)도 할지</li>
|
|
</ul>
|
|
</section>
|
|
</main>
|