feat: run server functions on edge
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user