UNPKG

1.83 kBJavaScriptView Raw
1/**
2 * @typedef {Object} IFSiteConnectionOptions
3 *
4 * @property {string} [host=localhost]
5 * @property {number} [port=8080]
6 * @property {boolean} [ssl=false]
7 */
8
9/**
10 * @typedef {Object} IFSiteSSLOptions
11 *
12 * @property {string} [ssl.key] Full or relative (at project_folder) path to key.pem (just path, not need read as file)
13 * @property {string} [ssl.cert] Full or relative (at project_folder) path to cert.pem (just path, not need read as file)
14 * @property {string} [ssl.pfx] Full or relative (at project_folder) path to pfx.pem (just path, not need read as file)
15 */
16
17/**
18 * @callback IFSiteURLMethod
19 *
20 * @param {string} pathname
21 */
22
23/**
24 * @typedef {Object} IFSiteConfig
25 *
26 * @property {string} connection Connection builder
27 * @property {IFSiteSSLOptions} ssl SSL support (check https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener)
28 * @property {IFSiteConnectionOptions} local Local url (use for start server)
29 * @property {IFSiteConnectionOptions} global Global url ("nice" domain of site)
30 *
31 * @property {string} origin Equal to: http(s)://${host}[:${port}] (if set site.ssl - https, other - http)
32 * @property {IFSiteURLMethod} url Method for generate link
33 */
34
35
36
37/**
38 * JSON object with all application options. Can contain any options (same of options parse by ifnode)
39 * Path to config's folder - ${project_folder}/config
40 *
41 * @typedef {Object} IFConfig
42 *
43 * @property {string} environment Environment name
44 * @property {IFSiteConfig} site Description of site url
45 * @property {Object} application Application specified options
46 * @property {Object} db Data Access settings
47 */