If you are looking for a v3 implementation, switch branch to v3.
- If you don’t have one, create a Shopify partner account.
- If you don’t have one, create a Development store where you can install and test your app.
- In the Partner dashboard, create a new app. You’ll need this app’s API credentials during the setup process.
- Install dependencies
$ yarn install
- Connect it through CLI v2 to a manually created app in your partner dashboard:
$ shopify app connect
- Run:
$ shopify app serve
-
Build the production bundle using the following command:
$ yarn build
Note that Next.Js checks typescript correctness and this previous command will fail if you have any typescript errors in your code. I suggest fixing the errors, but if you want to bypass typescript and still build your app, go to
next.config.js
and add the following code to yourmodules.exports
object as indicated in the official docsconst moduleExports = { typescript: { // !! WARN !! // Dangerously allow production builds to successfully complete even if // your project has type errors. // !! WARN !! ignoreBuildErrors: true, }, ...(the rest of your configuration) }
-
Then run this command to start the server with
NODE_ENV=production
:
$ yarn start
This respository is available as open source under the terms of the MIT License.