Setup a new Next.js app with Makeswift in less than 5 minutes.
makeswift init command
There are two ways to integrate a Next.js app with Makeswift — manually, or with the CLI. This guide will show you how to do it with the CLI.
npx makeswift@latest init
- If you are starting from scratch, it will ask for a project name, then scaffold a new Next.js app ready to be connected to Makeswift.
- If you are working with an existing Next.js app, after you confirm you'd like to integrate it, the CLI will generate all the necessary files to integrate it with Makeswift.
AnchorConnect the Next.js app to a Makeswift site
It will then open your browser and prompt you to select a Makeswift site to connect to your local Next.js app. You may need to login or sign up, but then you will be redirected to this page.
You can select an existing site or create a new one.
Once you've selected a site, you're done integrating.
If you did not pass a custom example, you will see a
HelloWorld component like in the following picture. Make sure the site has at least one page.
Look in your local Next app to see how this is registered — this is how you can register your own components. Learn more about registering components here.