Provides some friendly assistance to get started developing apps on the Tradeshift platform.
Install dependencies.
$ npm install
Activate the Bucko app on Tradeshift to get API credentials.
Run the command shown in the Bucko app to setup environment variables.
$ cat > .env << EOF
# API credentials for Bucko on Tradeshift
# https://sandbox.tradeshift.com/#/apps/Tradeshift.Bucko
TS_API_HOST=<api host>
TS_COMPANY_ID=<company id>
TS_CONSUMER_KEY=<consumer key>
TS_CONSUMER_SECRET=<consumer secret>
TS_TOKEN=<token>
TS_TOKEN_SECRET=<token secret>
# Auth token for ngrok tunnel provider
NGROK_TOKEN=<token for ngrok tunnel>
EOF
Create an app and release it on Tradeshift.
$ npm run create-app
Start the server - along with the tunnel - so requests for your app are redirected to your local server.
$ npm run start-app
Activate your app in Tradeshift (the appstore URL was shown in the output of npm run create-app
) and you should be able to develop locally and see the changes in Tradeshift.
Go to the https://localhost:8443
and confirm self-signed certificate
Go the Tradeshift and see your app running
Happy coding!