Basic TypeScript Example with Next.js

Demo

https://makeswift-examples-basic-typescript.vercel.app/

How to use

  1. Download the example:
npx degit makeswift/makeswift/examples/basic-typescript basic-typescript
cd basic-typescript
  1. Install dependencies:
yarn install
# or
npm install
  1. Update the .env file to include your Makeswift site's API key:
   MAKESWIFT_API_HOST=https://api.makeswift.com
-- MAKESWIFT_SITE_API_KEY=
++ MAKESWIFT_SITE_API_KEY=<YOUR_MAKESWIFT_SITE_API_KEY>
  1. Run the local dev script:
yarn dev
# or
npm run dev

Your host should be up and running on http://localhost:3000.

  1. Finally, go to your Makeswift site settings and add http://localhost:3000/makeswift as the custom host preview URL and you're all set!