mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-16 05:33:00 +00:00
72 lines
2.6 KiB
TOML
72 lines
2.6 KiB
TOML
# This file defines the default configuration settings.
|
|
##### DO NOT EDIT THIS FILE. #####
|
|
# Your changes may be overwritten in a future update.
|
|
# Instead, edit the custom configuration file located at "data/settings.toml".
|
|
|
|
[env]
|
|
# The operating mode. Can be either "development", or "production" (default; activates a number of optimisations which might make development harder, such as 3rd-party library caches)
|
|
mode = "production"
|
|
|
|
[http]
|
|
# HTTP related settings
|
|
|
|
# Whether to enable cross-origin-request-sharing. This allows HTTP API queries
|
|
# from origins other than that of the origin of the HTTP API itself.
|
|
# For example, if the HTTP API is running on sensors.connectedhumber.org, then
|
|
# Without CORS a client-side Javascript program running on foo.example.com would
|
|
# not be able to request data.
|
|
# Possible values: false (disabled), a string (an origin to allow; set via the access-control-allow-origin header), or the special string "*" (allows all origins)
|
|
cors = false
|
|
# cors = "subdomain.example.com"
|
|
# cors = "*"
|
|
|
|
[database]
|
|
# Settings that control the database, or the connection to it
|
|
|
|
type = "mysql" # MariaDB. MySQL servers might work too, but no promises.
|
|
|
|
# The host that the database is running on. Both IP addresses & domain names are fine I think :-)
|
|
host = "127.0.0.1"
|
|
# The database to use.
|
|
name = "aq_db"
|
|
|
|
# The username to connect with
|
|
username = "user"
|
|
# the password to connect with
|
|
password = "Define_in_custom_config_file"
|
|
|
|
[routing]
|
|
# Settings that control the router's behaviour
|
|
|
|
# The default action to take if no action is specified
|
|
default-action = "index"
|
|
|
|
[cache]
|
|
# Settings that control how we request that appropriate API responses be cached.
|
|
# Note that these only affect select responses that won't change.
|
|
# Note also that cache headers are only sent in production mode - see env.mode above
|
|
max-age = 2592000 # 30 days
|
|
|
|
# The max-age for time-sensitive data (e.g. last_seen values). Defaults to 30 seconds, which should yield some benefit).
|
|
max-age-supershort = 30 # 30 seconds
|
|
|
|
[data]
|
|
# Settings relating to the data returned by the API.
|
|
|
|
# The maximum number of seconds difference allowed before a reading is
|
|
# considered to be part of a different set.
|
|
#
|
|
# This is required, as not all the data items come in at the same time - so we
|
|
# need to be a bit 'fuzzy' about which readings we consider to be part of which
|
|
# time-step. Ideally, this value should be half of the actual data recording
|
|
# interval.
|
|
max_reading_timediff = 180
|
|
|
|
[limits]
|
|
# Various tunable limits.
|
|
|
|
[limits.device_data_recent]
|
|
# The device-data-recent action
|
|
|
|
# The max. number of rows allowed in a single request
|
|
max_rows = 1000
|