v0.1.9 - 인증 API 추가

This commit is contained in:
2026-04-21 17:56:47 +09:00
parent d5aa7f8153
commit 20095a79db
10 changed files with 310 additions and 6 deletions

View File

@@ -2,16 +2,22 @@ import Fastify from 'fastify'
import cors from '@fastify/cors'
import { env } from './config.js'
import { sqlite } from './db/client.js'
import { ensureDatabaseSchema } from './db/init.js'
import { registerAuthRoutes } from './routes/auth.js'
const app = Fastify({
logger: true,
})
ensureDatabaseSchema()
await app.register(cors, {
origin: env.CORS_ORIGIN,
credentials: true,
})
await registerAuthRoutes(app)
app.get('/health', async () => {
const version = sqlite.prepare('select sqlite_version() as version').get()
@@ -26,11 +32,11 @@ app.get('/health', async () => {
})
app.get('/api/meta', async () => ({
auth: 'planned',
auth: 'active',
storage: 'sqlite',
orm: 'drizzle',
notes: [
'회원가입 로그인 API는 다음 단계에서 추가 예정',
'회원가입, 로그인, 현재 사용자 확인 API가 준비되어 있습니다.',
'플래너 저장 API는 로컬 저장 레이어 분리 이후 연결 예정',
],
}))