Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article serves as a guide to getting connectors set up for local development.



Table of Contents
stylenone



1 - Basics

  1. Fork and clone the project repository for the connector on your machine
  2. Navigate to the project directory in your console and run:  bundle install
  3. Be sure to set up your database by running:  rake db:setup 

2 - Environment Variables

Before starting the connector, the environment variables must be set:

2.1 - application.yml

From your console run:  cp config/application.sample.yml config/application.yml

Your application.yml file should look something like this:

Code Block
encryption_key1:
encryption_key2:

SIDEKIQ_USERNAME: admin
SIDEKIQ_PASSWORD: password

REDIS_URL: redis://localhost:6379/0/<project-name>

MNO_DEVPL_HOST: https://dev-platform.maestrano.com
MNO_DEVPL_API_PATH: /api/config/v1/marketplaces
MNO_DEVPL_ENV_NAME: 
MNO_DEVPL_ENV_KEY:
MNO_DEVPL_ENV_SECRET:

2.1.1 - Encryption Keys

These can be set to anything. Just be sure to set them as they are required for the connector to run.

2.1.2 - MNO_DEVPL Variables

  • MNO_DEVPL_HOST => The url to the developer platform that the connector will be using
  • MNO_DEVPL_API_PATH => Usually already set in the project; This is the path the connector will use to fetch the marketplace environments/configuration from the Developer PlatformMNO_DEVPL_ENV_NAME => The name of the environment the connector will be linked to (This comes from the Developer Platform)
  • MNO_DEVPL_ENV_KEY & MNO_DEVPL_ENV_SECRET => These variables can be found in the Developer Platform (Each environment has a different set of keys)

3 - Connector Specific - Additional Set-up

Each specific connector may have some variations to the set-up process:

3.1 - BigCommerce

3.1.1 - Additional Environment Variables

  1. bc_client_id: and bc_client_secret:
    The bc_client_id and bc_client_secret should be set to the client_id and client_secret from your BigCommerce API account:
    1.Sign up for an account at https://www.bigcommerce.com/ (You can just use a free trial account)
    2.Once you have created your account, sign-in to your BigCommerce dashboard
    3.From the dashboard you will need to go to:  Advanced Settings → API Accounts
    4.Create an API account. On creation, you will be provided with credentials for your new API account. These include your Client ID, Client Secret, and Access Token. (be sure to save these as they cannot be retrieved again later) 
  2. DEFAULT_APP_PROTOCOL: and DEFAULT_APP_HOST:
    The DEFAULT_APP_PROTOCOL and DEFAULT_APP_HOST should be set to the url for your ngrok forwarding address (e.g. DEFAULT_APP_PROTOCOL: https, DEFAULT_APP_HOST: 9fd9ca8e.ngrok.io)