A trimmed down boilerplate for an embedded Shopify Application
Included features:
- A Koa.js server that uses Shopify's library for OAuth
koa-router
ejs
to render a minimal HTML view- An App Bridge connection
This project is more about what isn't included:
- React/Next.js or any client library
- Preprocessing like Babel
- project configuration like linting
- testing (be sure to add some!)
Why ejs though? To pass the API key to App Bridge on the front end. Adding a client build process could replace ejs.
- Node.js
- Shopify Partner account
- Shopify CLI (be sure to login first)
- a (probably fresh) Shopify app
- a development shop
Clone this repo to your local environment and a few Shopify CLI commands:
git clone git@github.com:tbeseda/slim-shopify-node-app.git my-new-app
cd my-new-app
npm i # or yarn
Make sure your Shopify CLI is logged in then connect this codebase to your app and store:
shopify whoami
shopify node connect
Start the server:
shopify node serve
Use the URL provided by the CLI to install your app.
Once authenticated you should be redirected to the main index showing a simple <h1>
and a "Toast" confirming that App Bridge connected 👍
Build your app!
- pick a database (gotta save those access tokens)
- use a client build process
- add some of the tools offered by Shopify (like Polaris)
- deploy to the cloud
- get your app approved