Skip to content

Commit

Permalink
feat(api): set base path to /v1 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev committed Jun 8, 2024
1 parent 5cb59f0 commit 4484a8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const app = new Hono({ strict: true })
.use(logger())

// * Mounting versioned APIs
.route('/api/v1', appV1)
.route('/v1', appV1)

export * from './v1/validation'
export * from './prisma/generated/zod'
Expand Down
3 changes: 3 additions & 0 deletions apps/api/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
rewrites: () => [
{ source: '/v1/:path*', destination: '/api/v1/:path*' },
]
}

module.exports = nextConfig

0 comments on commit 4484a8a

Please sign in to comment.