Advertisement
Guest User

Untitled

a guest
Aug 19th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Originale latest version: https://raw.githubusercontent.com/node-red/node-red/master/settings.js
  3.  **/
  4.  
  5. var fs = require("fs");
  6. //var i2c = require("i2c-bus");
  7. var mySettings;
  8. try {
  9.     mySettings = require("/home/pi/.node-red/redvars.js");
  10. } catch(err) {
  11.     mySettings = {};
  12. }
  13.  
  14. module.exports = {
  15.     uiPort: process.env.PORT || 1880,
  16.     mqttReconnectTime: 15000,
  17.     serialReconnectTime: 15000,
  18.     debugMaxLength: 1000,
  19.     flowFile: 'flows.json',
  20.     flowFilePretty: true,
  21.     httpStatic: '/home/pi/.node-red/public',
  22.     functionGlobalContext: {
  23.         os:require('os'),
  24.         moment:require('moment'),
  25.         fs:require('fs'),
  26.         //i2c:require('i2c-bus'),
  27.         mySettings:mySettings
  28.     },
  29.     logging: {
  30.         console: {
  31.             level: "info",
  32.             metrics: false,
  33.             audit: false
  34.         }
  35.     },
  36.     //adminAuth: { type: "credentials", users: [{ username: "NRUSERNAMEA", password: "NRPASSWORDA", permissions: "*" }] },
  37.     //httpNodeAuth: {user:"NRUSERNAMEU", pass:"NRPASSWORDU"},
  38.     editorTheme: { projects: { enabled: false }
  39.     }
  40.  
  41.     // By default, credentials are encrypted in storage using a generated key. To
  42.     // specify your own secret, set the following property.
  43.     // If you want to disable encryption of credentials, set this property to false.
  44.     // Note: once you set this property, do not change it - doing so will prevent
  45.     // node-red from being able to decrypt your existing credentials and they will be
  46.     // lost.
  47.     //credentialSecret: "a-secret-key",
  48.  
  49.     //https: {
  50.     //    key: fs.readFileSync('privatekey.pem'),
  51.     //    cert: fs.readFileSync('certificate.pem')
  52.     //},
  53.     //requireHttps: true
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement