Skip to content

Commit

Permalink
"Added 'runtime: edge' export to three API route files"
Browse files Browse the repository at this point in the history
  • Loading branch information
lrmn7 committed Jun 19, 2024
1 parent a620bbd commit 8d6bd05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/api/hello.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

export const runtime = 'edge';
export default function handler(req, res) {
res.status(200).json({ name: "John Doe" });
}
2 changes: 1 addition & 1 deletion pages/api/now-playing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { getNowPlaying } from "../../lib/spotify";

export const runtime = 'edge';
export default async function handler(
req: NextApiRequest,
res: NextApiResponse
Expand Down
3 changes: 3 additions & 0 deletions pages/api/top-tracks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// api/top-tracks.js
import type { NextApiRequest, NextApiResponse } from "next";
import { getTopTracks } from "../../lib/spotify";

export const runtime = 'edge';

export default async function handler(
req: NextApiRequest,
res: NextApiResponse
Expand Down

0 comments on commit 8d6bd05

Please sign in to comment.