-
In
package.json
, update"build": "vite build && vite build --ssr"
to"build": "prisma generate && vite build && vite build --ssr"
and add"postinstall": "prisma generate"
; -
In
app/shopify.server.js
, updateimport "@shopify/shopify-app-remix/adapters/node";
toimport "@shopify/shopify-app-remix/adapters/vercel";
; -
In
prisma/schema.prisma
, updatedatasource db
to
datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
}
-
In
prisma/migrations/.../migration.sql
, update"expires" DATETIME
to"expires" TIMESTAMP(3)
; -
Deploy the app on Shopify partner admin
npm run deploy
and distribute it to the store(s); -
Use
npm run shopify app env show
to getSCOPES
,SHOPIFY_API_KEY
, and theSHOPIFY_API_SECRET
values; -
Deploy the app on Vercel, adding the following environment variables:
- NODE_ENV = production
- SHOPIFY_APP_URL
- SCOPES
- SHOPIFY_API_SECRET
- SHOPIFY_API_KEY
-
Create a Postgresql on Vercel, and connect with the project;
-
Redeploy the project.
These docs can help: