BC Frontend library
npm install bc-frontend-librarybash
npm install bc-frontend-library
`
After installing the library, you can start using it to fetch pages and their data. The primary function you'll interact with is getPage. Additionally, the PAGES constant provides a list of all existing pages on the server.
Import the Library
`bash
import { getPage } from 'bc-frontend-library';
`
Add variables in env file
`bash
NEXT_PUBLIC_STRAPI_API_URL=https://binarycloudnz-backend.binarycloud.nz
NEXT_IMAGE_DOMAIN=binarycloudnz-backend.binarycloud.nz
`
Add configuration in next config
`bash
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: process.env.NEXT_IMAGE_DOMAIN,
},
],
},
};
``