Config
This is a sample of the configuration file. Copy this to Config.js in the top directory and edit all the values to set your Tsugi configuration.
Calling sequence in a NodeJS app:
var config = require('tsugi-node/src/core/Config'),
CFG = new Config ();
var Tsugi = require('tsugi-node/src/core/Tsugi');
launch = Tsugi.requireData(CFG, req, res, session, Tsugi.ALL);
if ( launch.complete ) return;
Constructor Summary
Public Constructor | ||
public |
constructor(configuration: Object) |
Member Summary
Public Members | ||
public |
LTI: * |
|
public |
Effectively an "airplane mode" for the appliction. |
|
public |
The host name, it could be an IP address or a name. |
|
public |
The database name. |
|
public get |
The database password (encrypted) |
|
public |
The database port. |
|
public |
The dbprefix allows you to give all the tables a prefix in case your hosting only gives you one database. |
|
public get |
The database user (encrypted) |
|
public |
Where the bulk mail comes from - should be a real address with a wildcard box you check. |
|
public |
Mail end of line - Depends on your mailer - may need to be \r\n By default: '\n' |
|
public get |
The mail secret (encrypted) |
|
public |
Set the nonce clearing check proability By default: 100 |
|
public |
Set the nonce expiry time By default: 1800 |
|
public |
pdox: * |
|
public |
This is used to make sure that our constructed session ids based on resource_link_id, oauth_consumer_key, etc are not predictable or guessable. |
|
public |
You can use the CDN copy of the static content in testing or light production. |
|
public get |
Returns the local directory where client libraries are. |
|
public |
The desired timezone. |
|
public |
Unit testing flag By default: false |
|
public |
|
|
public |
This is the URL where the software is hosted Do not add a trailing slash to this string |
Public Constructors
public constructor(configuration: Object) source
Params:
Name | Type | Attribute | Description |
configuration | Object |
|
Object to initialize the public properties with alternative values. Look at public properties to see which properties can be overrided. |
Example:
var config = new Config ({
'dbport': '3306',
'dbhost': 'mydomain.com'
});
Public Members
public LTI: * source
public OFFLINE: boolean source
Effectively an "airplane mode" for the appliction. Setting this to true makes it so that when you are completely disconnected, various tools will not access network resources like Google's map library and hang. Also the Google login will be faked. Don't run this in production. By default: false.
public dbhost: string source
The host name, it could be an IP address or a name. By default: '127.0.0.1'
public dbprefix: string source
The dbprefix allows you to give all the tables a prefix in case your hosting only gives you one database. This can be short like "t_" and can even be an empty string if you can make a separate database for each instance of TSUGI. This allows you to host multiple instances of TSUGI in a single database if your hosting choices are limited. By default: '' empty.
public maildomain: boolean source
Where the bulk mail comes from - should be a real address with a wildcard box you check. By default: false
public maileol: string source
Mail end of line - Depends on your mailer - may need to be \r\n By default: '\n'
public pdox: * source
public sessionsalt: string source
This is used to make sure that our constructed session ids based on resource_link_id, oauth_consumer_key, etc are not predictable or guessable. By default: warning:please-change-sessionsalt-xxxx'
public staticroot: string source
You can use the CDN copy of the static content in testing or light production. If you check out a copy of the static content locally and do not want to use the CDN copy (perhaps you are on a plane or are otherwise not connected) change this configuration. By default: /tsugi-static
public get staticrootDir: * source
Returns the local directory where client libraries are. Only if the staticroot is not an CDN address