This project uses Shopify webhooks to parse orders from Shopify, produce CSV format required by Emons and upload CSV to the Emons's FTP server.
- NodeJS (tested on v10.15.3, see
enginessection ofpackage.json) - MySQL (tested on v5.7.18)
- Shopify "Order payment" webhook. Learn more about setting it up.
- SSL (https) - required by Shopify. You can use ngrok for local testing
Copy .env.example to .env file:
cp .env.example .envChange parameters accordingly.
- MySQL:
DB_USER- required - usernameDB_PASS- required - passwordDB_NAME- required - database nameDB_HOST- IP or domain name, defaults tolocalhostDB_PORT- port, defaults to3306FORCE_DB_SYNC- set totrueif you want to reset you DB - will RESET your orders table (i.e., delete all orders)
- SSL/HTTP:
SSL_PRIVATE_KEY- required for production - full path to your private key (-----BEGIN PRIVATE KEY-----...)SSL_CERTIFICATE- required for production - full path to your certificate (-----BEGIN CERTIFICATE-----...)HTTP_PORT- port for listening to HTTP requests (helpful for local testing), defaults to80HTTPS_PORT- port for listening to HTTPS requests, default to443USE_HTTPS- whether to use HTTPS or not (helpful for local testing), defaults tofalse
- Shopify:
SHOPIFY_WEBHOOK_SECRET- required - token used to validate webhooks, can be found at https://yourstore.myshopify.com/admin/settings/notifications (replaceyourstorein url)SHOP_DOMAIN- required - used to validate webhooks
- FTP:
FTP_USER- required - usernameFTP_PASS- required - passwordFTP_HOST- where to upload CSV files, defaults toftp.emons.deFTP_PORT- ftp port, defaults to21FTP_SECURE- use FTPS or not, defaults tofalse