Arguments

  1. apiKey
    string
    required

    The API key for the Makeswift site.

  2. options
    object

    Options for a runtime instance.

Example

The following example instantiates a new Makeswift client.

src/makeswift/client.ts
import { Makeswift } from "@makeswift/runtime/next";
import { strict } from "assert";

import { runtime } from "./runtime";

strict(
  process.env.MAKESWIFT_SITE_API_KEY,
  "MAKESWIFT_SITE_API_KEY is required"
);

export const client = new Makeswift(process.env.MAKESWIFT_SITE_API_KEY, {
  runtime,
});