SampleApp can help you quickly understand how ShopBase app works with a full api & auth server (in backend folder)
with vue dashboard (in dashboard folder).
- NodeJS (tested with nodejs 8)
- Yarn
Additional
npm install -g nodemon- Create a local mysql database
- Edit development mysql server in
backend/config/config.json
cd backend
yarn install
npx sequelize db:migrateyarn devYour api server is now live at http://127.0.0.0:3000
cd dashboard
yarn install
yarn devYour dashboard is now live at http://127.0.0.1:8080. Now you can open your dashboard and start installing SampleApp from your local server.
You can use this repo as code base to write your own app, follow instruction on ShopBase Developers
to create your own app, then replace your app tokens in backend/config/*
After test main auth flow (required), have your shop access token in database. To test webhook, please follow below steps.
- Go to https://ngrok.com and sign up for a free account
- Follow ngrok instruction to setup ngrok in your computer
- Run
ngrok http 3000to start a ngrok tunnel to your http://127.0.0.1:3000 endpoint - Update
backend/config/config.default.jswith keywebhookBaseUrlto match your ngrok endpoint - Visit http://127.0.0.1:3000/v1/orders/register-webhook to register
order/createwebhook on your shop - Go to your shop and create a new order
- You should see ngrok console log with webhook request