A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
- Run
npm install && npm install -g @shopify/cli@latest
to install dependencies. - Create a new Public app from your Shopify Partner Dashboard.
- Setup Partner Dashboard
- Run
npm run ngrok
to generate your subdomain. Copy the<your-url>
domain and add it inAPI_HOST_NAME
in your.env
file. - Setup URL's manually by heading over to Shopify Partner Dashboard > Apps > Your App Name > Configuration
- In the URLs section
- App URL:
https://<your-url>
- Allowed Redirection URL(s):
https://<your-url>/api/v1/shopify-auth/offline
https://<your-url>/api/v1/shopify-auth/online
- Embedded in Shopify admin:
- should be
true
- should be
- Compliance webhooks
- Customers Data Request:
https://<your-url>/api/v1/mandatory-webhook/customers/data-request
- Customers Redact:
https://<your-url>/api/v1/mandatory-webhook/customers/redact
- Shop Redact:
https://<your-url>/api/v1/mandatory-webhook/shops/redact
- Customers Data Request:
- App URL:
- In the API access section
- Protected customer data access:
- Choose
App functionality
- Choose
- Protected customer data access:
- Run
- Build your
.env
file in core project based on.env.example
. Some envs explanation:DATABASE_URL
: Postgres connection URL. If you're using a locally hosted version,postgresql://<username>:<password>@localhost:5432/<dbname>
API_HOST_NAME
: URL generated from Ngrok. It should not contain trailing slash.
- You can choose Shopify api scopes in apps/server/src/config/shopify.config.ts
- A list of access scopes can be found here
- Build your
shopify.app.toml
file in core project based onshopify.app.toml.example
- Prisma migrations
- Run
db:migrate:dev
to run db migrations
- Run
- Build project
- Run
build
to build project.
- Run
- Running App
- Development Mode
- Run
npm run ngrok
to create a ngrok instance if you haven't already. - Run
npm run dev
to run the server in development mode.
- Run
- Production Mode
- Run
npm run ngrok:prod
to create a ngrok instance if you haven't already. - Run
npm run build
to build both react and nest. - Run
npm run start
to run the server in development mode.
- Run
- Install the app by heading over to
https://<your-url>/api/v1/shopify-auth?shop=mystorename.myshopify.com
. In dev mode, if you try and install from your partner dashboard, it'll fail since it'll use Vite instead of Express to run the server. Or just select store in Shopify Partner Dashboard.
- Development Mode
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Nest is MIT licensed.