THT is in early Beta. We welcome contributors & feedback.

App Settings

App settings are located in settings/app.jcon.

Settings 

The following keys are supported under the tht section.

compressOutput

Default: true

Automatically apply GZIP compression to responses for Web.sendPage(), Web.sendCss(), and Web.sendJs().

This reduces the total response size over the wire by up to 70%.

You might need to disable this if your webserver is already configured to compress responses.

compressOutput: true

contentSecurityPolicy

Default: default-src 'self'; style-src 'unsafe-inline' *; img-src *; media-src *; script-src 'nonce-___'

See Content Security Policy (CSP).

NoteA secure nonce is generated every request.

downtime

Default: false

Set to true to respond to all requests with a standard downtime page. Or set it to a custom URL in your document root directory.

This will return a 503 Service Unavailable HTTP response code.

downtime: true

downtime: /down.html

memoryLimitMb

Default: 16

Maximum memory usage (megabytes) per request.
memoryLimitMb: 32

minifyCssTemplates

Default: true

Automatically minify -Css templates at compile time.
minifyCssTemplates: false

minifyJsTemplates

Default: true

Automatically minify -Js templates at compile time.
minifyJsTemplates: false

sessionDurationMins

Default: 120

Amount of time (minutes) to wait after a user’s last request before their session expires. See Session.
sessionDurationMins: 30

showErrorPageForMins

Default: 30

The amount of time (in minutes) since the app was last compiled, to show a full error page. Otherwise, you can find error information in data/files/app.log.
showErrorPageForMins: 5

showPerfScore

Default: false

Display performance stats at the bottom of every web page. See Perf Score.
showPerfScore: true

timezone

Default: GMT

Server timezone. See the list of supported timezones.
timezone: America/Los_Angeles