Flow / 02. Configuration
Updated: 02. April 2018
Author: Peter Širka

02. Configuration

Professional Support Chat with contributors

Configuration can be changed in the app /config file by adding the code below. If the /config file doesn't exist then create it /yourapp/config as a plain text file without file extension.

package#flow      (Object) : { auth: ['username:password'], dark: true }

Flow options

Property: auth

Enables authorization. This property can have two types of value.

auth = true;
// {Booelan}
// Enables Total.js authorization via F.onAuthorize delegate.
// In other words: Flow adds "authorize" flag to own routes

auth = ['username:password', 'petersirka:123456'];
// {String Array}
// Enables HTTP Basic authorization

Property: backup

+v4.1.0 Enables backing up of settings for Flow designer.

backup;
// {Boolean}
// Default value: false

Property: crashmode

+v4.3.0 Enables crash mode (the flow won't be applied after start). IMPORTANT: crash mode can be enabled via command line node yourflowapp.js --crashmode

crashmode;
// {Boolean}
// Default value: false

Property: dark

Enables dark theme as default. Otherwise the theme will be light.

dark;
// {Boolean}
// Default value: false

Property: debug

+v4.1.0 Enables monitoring of component files. If some file will be modified then the Flow refresh it.

debug;
// {Boolean}
// Default value: false

Property: limit

A maximum size limit for received message through the WebSocket

limit;
// {Number}
// Default value: 150

Property: restrictions

Enables IP restrictions for the specified IP addresses.

restrictions = ['127.0.0.1', '62.168.127.195'];
// {String Array}
// Default: null

Property: templates

An absolute URL address to Flow pred-defined templates of components.

templates;
// {String}
// Default value: "https://github.com/totaljs/flowcomponents/blob/master/templates4.json"

Property: templates2

+v4.1.0 An absolute URL address to second Flow pred-defined templates of components. It was added because some developers wanted to use main templates and own templates together.

templates2;
// {String}
// Default value: ""

Property: token

Enables tokens authorization. In other words: URL address must contain a token query parameter.

token = ['OUR_COMPANY_TOKEN'];
// {String Array}
// Enables token
// It works in the form: /$flow/?token=OUR_COMPANY_TOKEN
// Default: null

Property: updates

+v4.3.0 Enables auto-check updates if the user opens components.

updates;
// {Boolean}
// Default value: true

Property: url

A relative URL address for Flow designer.

url;
// {String}
// Default value: "/$flow/"