Creating a new project
The first thing you'll need to do is to create a new rails application using the connector template:
...
Code Block |
---|
# These keys are used to encrypt OAuth tokens (or API Keys) and should be set to 256-bit Keys encryption_key1: 'E5CD3EDD6E577441CAB9142A1C36A' encryption_key2: '9B1EF27DF57296E8E1A9143EEB783' SIDEKIQ_USERNAME: admin SIDEKIQ_PASSWORD: password REDIS_URL: redis://localhost:6379/0/connector-test MNO_DEVPL_HOST: https://developer.maestrano.com MNO_DEVPL_API_PATH: /api/config/v1/marketplaces MNO_DEVPL_ENV_NAME: connector-test MNO_DEVPL_ENV_KEY: [API KEY FROM DEVELOPER PLATFORM] MNO_DEVPL_ENV_SECRET:[API SECRET FROM DEVELOPER PLATFORM] |
Health Check
The endpoints perform health check for connector you just created.
/health_check
/health_check/full
/health_check/full performs c
omplete health check (cache, smtp, database, ...). See health_check and the initalizer for the default configuration. There are also additional health_checks that this URL performs , It checks connectivity to Connec! and Dev Platform.
You can override it by creating an initalizer in the connector, eg:
Code Block |
---|
# my-mnoe-app/config/initializers/health_check.rb
HealthCheck.setup do |config|
# You can customize which checks happen on a standard health check
config.standard_checks = %w(cache site)
# You can set what tests are run with the 'full' or 'all' parameter
config.full_checks = %w(cache site custom database migrations)
end |
You can also add custom checks, Refer to health_check Gem.
Local development
To test against a local development environment, create an Environment named Local in the Developer Platform and use your local application URL as the Application Host: http://localhost:3001
...