Skip to content

Commit

Permalink
feat: 配置化函数运行时
Browse files Browse the repository at this point in the history
  • Loading branch information
besscroft committed Apr 3, 2024
1 parent 44c9a1e commit 8bffad0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/api/login/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'server-only'
import { NextRequest } from 'next/server'

export const runtime = 'edge'

export async function POST(request: NextRequest) {
const res = await request.json()
Expand Down
6 changes: 5 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
experimental: {
runtime: 'edge', // Function Runtime, 'nodejs' (default) | 'edge'
},
};

export default nextConfig;

0 comments on commit 8bffad0

Please sign in to comment.