/arc.extension-api

An API service extension for Arc that allows HTTP traffic to communicate with Microservices

Primary LanguageJavaScriptMIT LicenseMIT

Arc | API Extension

Build Status Maintainability Test Coverage

An API service for Arc that allows HTTP traffic to communicate with microservices and an interface to view microservice runtime details.

Install

npm install arc.extension-api

Use

const arc = require(`arcms`);
const extension = require(`arc.extension-api`);

const options = {
  port: 8080
};

arc.addExtension(extension, options);

What You Get

  • An interface to view runtime details and states for the microservices Arc is running at localhost:8080
  • HTTP endpoints for your microservices.
    • If you had a microservice named "My Microservice", you could now run it using localhost:8080/my-microservice
    • You can send also data to using query strings, localhost:8080/my-microservice?hello=world

Additional Information

File Tree

JavaScript
/index.js
/support/authentication.js
/support/check_api_options.js
/support/create_express_server.js
/support/find_microservice.js
/support/get_all_microservice_stats.js
/support/get_microservice_data.js
/support/get_one_microservice_stats.js
/support/listen_to_requests.js
/support/render_template.js
/support/usage_reporter.js

Environmental Variables

Variable Purpose
ARC_APP_NAME A name for your App
ARC_GITHUB_REPO A github repo url
ARC_GITHUB_WIKI A github wiki url
ARC_TRAVIS_BADGE_URL A travis badge url
ARC_TRAVIS_BADGE_IMG_URL A trais badge image url
ARC_CODECLIMATE_BADGE_URL A code climate badge url
ARC_CODECLIMATE_BADGE_IMG_URL A code climate badge image url
ARC_CODECLIMATE_COVERAGE_BADGE_URL A code climate coverage url
ARC_CODECLIMATE_COVERAGE_BADGE_IMG_URL A code climate image url
ARC_PIVOTAL_TOKEN A pivotal tracker token
ARC_PIVOTAL_PROJECT A pivotal tracker project