ebay-app-meta
vundefined
Published
Application metadata for cubejs app
Readme
app-meta
Module allows you to load raptor application metadata based on current cubejs environment (currently NODE_ENV = qa|pre-production|production). By default it will use production endpoint.
Install
Location: private ebay npm registry
Install with npm:
npm config set registry http://npmjs.stratus.dev.ebay.com/
npm install app-meta
Usage
Basic Usage
var appMetaPromise = require("ebay-app-meta").get(appName);
NOTE: appName is optional. If not provided, the app name will be read
from the "ebay.appName" property in the application's package.json
file.
require("ebay-app-meta").get('sherlock')
.then(function(meta) {
console.log('meta loaded: ', meta);
})
.fail(function(error){
console.error('Something went wrong! Exception: ', e);
});
Example on how to get page id
require("ebay-app-meta").get('sherlock')
.then(function(meta) {
var pageId = meta.getPageId('SearchPage')
console.log('pageId: ' + pageId);
})
.fail(function(error){
console.error('Something went wrong! Exception: ', e);
});