reggi / node-shopify-sixworks

A series of webhook endpoints that allow a Shopify store and the fulfillment service Sixworks (James and James) to work with one-another.
MIT License
0 stars 0 forks source link

Node Shopify Sixworks

This app does two things:

Summary

This app bridges the connection between Shopify and Sixworks.

Here's the flow:

Environment Variables

MONGOHQ_URL={{ value }}
SHOPIFY_API_KEY={{ value }}
SHOPIFY_PASSWORD={{ value }}
SHOPIFY_SHARED_SECRET={{ value }}
SHOPIFY_HOST_NAME={{ value }}
SHOPIFY_DEV_API_KEY={{ value }}
SHOPIFY_DEV_PASSWORD={{ value }}
SHOPIFY_DEV_SHARED_SECRET={{ value }}
SHOPIFY_DEV_HOST_NAME={{ value }}
SIXWORKS_URL={{ value }}
SIXWORKS_KEY={{ value }}
SIXWORKS_WEBHOOK_URL={{ value }}
ORDER_EMAIL_LOCK={{ value }}
NODE_ENV={{ value }}

Accompanying Modules

These two modules were originally included in this repo, I moved them out into their own github projects so that I can remove node_modules from this repo and properly install all the node modules.

The first is the simple node node sixworks api.

The second is a primative version of the node shopify api. There's a specific branch for-node-shopify-sixworks that is specifically the version I pulled from this source. This isn't on NPM and needs to be installed with the following command (and it's in package.json).

npm install git+https://github.com/reggi/shopify-api.git#for-node-shopify-sixworks --save

Building from scratch

Note: Ensure you have the environment variables set in a .env file.

git clone git@github.com:reggi/node-shopify-sixworks.git
cd node-shopify-sixworks
npm install
npm run local
heroku create node-shopify-sixworks
heroku config:push ## assuming you have .env setup
git push heroku master
heroku logs --tail

Query The Last 100 Orders

Last 100 orders to enter the database that were sent to sixworks.

find({"created.sixworks_response":{"$ne":false}}).sort({"created.date":-1}).limit(100)