Manual Installation
Manually add @quarkino/services package and its required files to an already existing application.
Note
If you have already generated a new application using the @quarkino/create-quarkino-app CLI tool you can skip this page and go directly to the Quick Start.
Package installation
npm install @quarkino/services
Setting up files
- Add this environment variable to your .env file
NEXT_PUBLIC_API_ADDRESS="THE_URL_TO_YOUR_QUARKINO_API_ENDPOINT"
- If you are using this package in a Next.js project, configure your image sources in the next.config file (optional)
module.exports = {
// the rest of your next config
images: {
remotePatterns: [
{
protocol: "https",
hostname: "example_url_to_your_quarkino_api.com",
},
],
},
};
- Since Quarkinos SDK is built on top of React Query for handling client side requests, add this provider to your react apps entry point:
"use client";
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
You can read more about React Query Here.