Home Reference Source Repository
import Config from 'tsugi-node/src/Config.js'
public class | source

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 CFG = require('./Config');
 var Tsugi = require('./src/Tsugi');

 launch = Tsugi.requireData(CFG, req, res, session, Tsugi.ALL);
 if ( launch.complete ) return;

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Effectively an "airplane mode" for the appliction.

public

Database connection information.

public
public get

The database password (encrypted)

public
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

public get

The mail secret (encrypted)

public

Set the nonce clearing check proability

public

Set the nonce expiry time

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
public
public
public

This is the URL where the software is hosted Do not add a trailing slash to this string

Public Constructors

public constructor source

Public Members

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.

public dbhost: string source

Database connection information.

public dbname: string source

public get dbpass: string source

The database password (encrypted)

public dbport: number source

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.

public get dbuser: string source

The database user (encrypted)

public maildomain: boolean source

Where the bulk mail comes from - should be a real address with a wildcard box you check

public maileol: string source

Mail end of line - Depends on your mailer - may need to be \r\n

public get mailsecret: string source

The mail secret (encrypted)

public noncecheck: number source

Set the nonce clearing check proability

public noncetime: number source

Set the nonce expiry time

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. Just make this a long random string. See LTIX::getCompositeKey() for detail on how this operates.

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.

public timezone: string source

public unitTesting: boolean source

public universal_analytics: boolean source

public wwwroot: string source

This is the URL where the software is hosted Do not add a trailing slash to this string