feat: run server functions on edge

This commit is contained in:
2023-02-10 18:50:02 +01:00
parent e1f739b095
commit ed16fb9765
17 changed files with 64 additions and 0 deletions

View File

@@ -3,6 +3,10 @@ import type { LayoutServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
import { fetchSwell } from '$utils/functions/shopServer'
export const config = {
runtime: 'edge'
}
export const load = (async () => {
try {
// Get content from API

View File

@@ -4,6 +4,10 @@ import { fetchAPI } from '$utils/api'
import { getRandomItem } from 'utils/array'
import { fetchSwell } from '$utils/functions/shopServer'
export const config = {
runtime: 'edge'
}
export const load = (async ({ setHeaders }) => {
try {
// Get content from API

View File

@@ -3,6 +3,10 @@ import type { PageServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
import { fetchSwell } from '$utils/functions/shopServer'
export const config = {
runtime: 'edge'
}
export const load = (async ({ params, setHeaders }) => {
try {
// Get content from API