strapi integration
This commit is contained in:
11
pages/index/+data.js
Normal file
11
pages/index/+data.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { strapi } from '@strapi/client'
|
||||
|
||||
export const data = async () => {
|
||||
const client = strapi({
|
||||
baseURL: 'https://cms.takerofnotes.com/api',
|
||||
auth: import.meta.env.STRAPI_API_TOKEN,
|
||||
})
|
||||
|
||||
const global = client.single('global')
|
||||
return await global.find()
|
||||
}
|
||||
Reference in New Issue
Block a user