UNPKG

@apidaze/node-red-contrib-apidaze

Version:
40 lines (33 loc) 933 B
const path = require('path'); var uiPort = process.env.PORT || 1880; var baseUrl; if (process.env.BASE_URL) { baseUrl = process.env.BASE_URL; } else if (process.env.HEROKU_APP_NAME) { baseUrl = 'https://' + process.env.HEROKU_APP_NAME + '.herokuapp.com'; } else { baseUrl = 'http://localhost:' + uiPort; } module.exports = { // the tcp port that the Node-RED web server is listening on uiPort: uiPort, // The file used to store the flows. Default: flows_<hostname>.json flowFile: path.resolve(path.join(__dirname, '/examples/Sample flow.json')), // defines order of the categories in the editor palette paletteCategories: [ 'subflows', 'apidaze', 'common', 'network' ], // sets global context data functionGlobalContext: { // required to provide the webhook URL in the XML output baseUrl: baseUrl, }, editorTheme: { header: { title: 'Apidaze Node-RED' } } };