2020-04-16 20:38:01 +00:00
|
|
|
const server_config = {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The server port.
|
|
|
|
* Currently, Flitter supports HTTP natively.
|
|
|
|
*/
|
|
|
|
port: env("SERVER_PORT", 80),
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The type of environment the application is running in.
|
|
|
|
* Usually, either "production" or "development".
|
|
|
|
* Development mode may cause the application to output extra
|
|
|
|
* debugging information not secure enough for production.
|
|
|
|
*/
|
|
|
|
environment: env("ENVIRONMENT", "production"),
|
|
|
|
|
|
|
|
logging: {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The logging level. Usually, 1-4.
|
|
|
|
* The higher the level, the more information is logged.
|
|
|
|
*/
|
2020-08-23 19:07:23 +00:00
|
|
|
level: env("LOGGING_LEVEL", 2),
|
2020-04-18 00:25:33 +00:00
|
|
|
|
|
|
|
include_timestamp: env("LOGGING_TIMESTAMP", false),
|
2020-10-19 01:49:19 +00:00
|
|
|
|
|
|
|
api_logging: env('LOG_API_RESPONSES', false),
|
2020-10-19 02:31:46 +00:00
|
|
|
|
|
|
|
error_logging: env('LOG_REQUEST_ERRORS', true),
|
2020-04-16 20:38:01 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
session: {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The secret used to encrypt the session.
|
|
|
|
* This should be set in the environment.
|
|
|
|
*/
|
2020-10-29 13:46:30 +00:00
|
|
|
secret: env("SECRET", "changeme"),
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The max age of a session in milliseconds
|
|
|
|
*/
|
|
|
|
max_age: env("SESSION_MAX_AGE", 1000 * 60 * 60 * 24 * 2), // default to 2 days
|
2020-04-16 20:38:01 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
uploads: {
|
2020-05-19 03:55:08 +00:00
|
|
|
enable: true,
|
|
|
|
allowed_path: /./,
|
2020-04-16 20:38:01 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Used by flitter-upload. Path for uploaded files.
|
|
|
|
* Should be relative to the application root.
|
|
|
|
*/
|
2020-05-19 03:55:08 +00:00
|
|
|
destination: './tmp.uploads',
|
2020-04-16 20:38:01 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
ssl: {
|
2020-04-17 00:59:48 +00:00
|
|
|
enable: env("SSL_ENABLE", false),
|
2020-04-16 20:38:01 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Path to your domain's certificate file.
|
|
|
|
* This should contain any intermediate certificates as well.
|
|
|
|
*/
|
|
|
|
cert_file: env("SSL_CERT_FILE", 'cert.pem'),
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Path to your domain's certificate key.
|
|
|
|
*/
|
|
|
|
key_file: env("SSL_KEY_FILE", 'cert.key'),
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-04-17 00:59:48 +00:00
|
|
|
module.exports = server_config
|