The "Config file key" is the key in the config object which is passed to the client side JS from the HTML and you can override it here:
public/example-config.js
, this file can be loaded by setting the CONFIG_URL
env varThe "Env var" options need to be set when you build the client side, as environment variables
Description | Default | Env var (build time) | Config file key |
---|---|---|---|
URL of the client side config file to load at startup | ${this.rootUrl}/silex.js |
- | clientConfigUrl |
Debug mode | false |
- | debug |
GrapesJs config | check the source code (src/ts/client/config.ts |
- | grapesJsConfig |
Google fonts API key, see this doc to get an API key | - | - | fontsApiKey |
Google fonts server or a free privacy-friendly drop-in replacement for Google Fonts or a proxy server to speed up the load and protect privacy | https://www.googleapis.com |
- | fontsServerUrl |
The "Config file key" is the key in the config object which is passed to the client side JS from the HTML and you can override it here:
.silex.js
Option | Alias | Description | Type | Environment Variable | Default Value |
---|---|---|---|---|---|
host | Sets the host parameter of the express module "cookie-session". | string | SILEX_HOST | localhost | |
port | -p |
Specifies the port that Silex will listen to. | integer | SILEX_PORT | 6805 |
protocol | Sets the protocol parameter of the express module "cookie-session". | string | SILEX_PROTOCOL | http | |
config | -c |
Path for the server-side config file to load at startup. | file path | SILEX_SERVER_CONFIG | |
client-config | Path to client config file to be served on .silex-client.js. | string | SILEX_CLIENT_CONFIG | ||
fs-root | Path to the root folder where to store websites. Used by the default connector (fs). | file path | SILEX_FS_ROOT | ||
fs-hosting-root | Path to the root folder where to publish websites. Used by the default hosting connector (fs). | file path | SILEX_FS_HOSTING_ROOT | ||
session-name | Sets the name parameter of the express module "cookie-session". | string | SILEX_SESSION_NAME | silex-session | |
session-secret | -s |
Sets the session secret for express module "cookie-session". | string | SILEX_SESSION_SECRET | replace this session secret in env vars |
ssl-port | Specifies the port to listen to for SSL/HTTPS. | integer | SILEX_SSL_PORT | ||
force-https | Forces Silex to use HTTPS. | boolean | SILEX_FORCE_HTTPS | ||
ssl-private-key | Path to private key for SSL. | file path | SILEX_SSL_PRIVATE_KEY | ||
ssl-certificate | Path to SSL certificate. | file path | SILEX_SSL_CERTIFICATE | ||
force-https-trust-xfp-header | Sets the trustXFPHeader parameter of the express module "cookie-session". Use only with --force-https. | boolean | SILEX_FORCE_HTTPS_TRUST_XFP_HEADER | ||
cors-url | Enables CORS for URL (can be "*"). | string | SILEX_CORS_URL | ||
express-json-limit | Sets the limit parameter of the express module "json". | string | SILEX_EXPRESS_JSON_LIMIT | 1mb | |
express-text-limit | Sets the limit parameter of the express module "text". | string | SILEX_EXPRESS_TEXT_LIMIT | 10mb | |
express-urlencoded-limit | Sets the limit parameter of the express module "urlencoded". | string | SILEX_EXPRESS_URLENCODED_LIMIT | 1mb | |
debug | Enables debug mode, with live reload, source maps, etc. | boolean | SILEX_DEBUG | FALSE |