Skip to content

Commit

Permalink
CF fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rgllm committed Apr 4, 2024
1 parent c4b5e98 commit ceefb66
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 54 deletions.
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const securityHeaders = [
module.exports = {
swcMinify: true,
reactStrictMode: true,
experimental: {
runtime: 'experimental-edge',
},
images: {
remotePatterns: [
{
Expand Down
2 changes: 1 addition & 1 deletion pages/api/bookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import toJson from 'lib/to-json'
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method === 'GET') {
try {
const allBookmarks = await prisma.bookmark.findMany({cacheStrategy: { ttl: 60 }})
const allBookmarks = await prisma.bookmark.findMany({cacheStrategy: {ttl: 60}})

return res.status(200).json(toJson(allBookmarks))
} catch (e) {
Expand Down
49 changes: 0 additions & 49 deletions pages/api/energy.ts

This file was deleted.

4 changes: 0 additions & 4 deletions pages/api/og.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import {ImageResponse} from '@vercel/og'
import {NextRequest} from 'next/server'

export const config = {
runtime: 'experimental-edge',
}

const fontRegular = fetch(
new URL('../../public/fonts/IBMPlexSans-Regular.ttf', import.meta.url),
).then(res => res.arrayBuffer())
Expand Down

0 comments on commit ceefb66

Please sign in to comment.