The frontend, backend, and infractructure required to make a Shopify app using Vue, Express, GraphQL, DynamoDB, and AWS Lambda.
aws-cli(sudo apt install awscli) (more installation options here)- Terraform
- Node 13.x (recommend nvm)
Remove the sample part of the filename .sample.env and fill in the values.
cd backend
npm install
npm start
// Listening on localhost:3000
cd frontend
npm install
npm start
// Listening on localhost:8081
To start working on this app in Shopify:
-
cd backend && npm startto the start the dev server on port3000 -
npm install -g ngrok && ngrok http 3000to expose the server to the outside world -
Login to
partners.shopify.com -
Apps>Create App -
Name your app and set:
# App Url
https://[hostname provided by ngrok]/install
# Allowed redirection URL(s)
https://[hostname provided by ngrok]/auth/callback
-
Create your
.envfile:cp .sample.env .env -
Copy the
API keyfrom the Shopify dashboard toSHOPIPY_API_KEY -
Copy the
API secret keyfrom the Shopify dashboard toSHOPIPY_API_SECRET_KEY -
Click
Test your appand install the app on your test store
Uses Terraform to spin up:
- An S3 bucket for storing build artifacts
- API Gateway and a Lambda function for running the server
- DynamoDB for storing Shopify Access Tokens
In the infra directory:
- Remove the
samplepart of the filename.sample.envand fill in the values - Create values for the Terraform
variables.tf make build-deploy-bucketto create an S3 bucket to store the build artifactmake deployto bundle the backend and push to the S3 bucketmake build-serverto create the API Gateway and Lambda function
The url output of make build-server can be used when setting up the app in partners.shopify.com.
Vue devtools