Gds-stack
Another utilization of NodeJS technologies in one package.
Technologies supported and available
Getting started
npm install --save gds-stack
Sample configuration
GDS-stack uses our very own fluid-chains to process configurations and for you to add your own chain.
var GDS = ; var fluidChains = ; var ExecuteChain = fluidChainsExecuteChain; var ClusterChains = GDSClusterChains; var DockerChains = GDSDockerChains; var DatabaseChains = GDSDatabaseChains; var ServerChains = GDSServerChains; var LoggerChains = GDSLoggerChains; var Logger = GDSLogger; var ExpressApp = GDSExpressApp; ;
Docker Configuration
For linked containers
Chain | Parameter | Description | value | default |
---|---|---|---|---|
DOCKER_CONNECT | docker_proxyHost | proxy host | ?String | none |
DOCKER_CONNECT | docker_proxyPort | proxy port | ?Number | none |
DOCKER_CONNECT | docker_serviceRetry | number of retries | *Number | none |
DOCKER_CONNECT | docker_serviceTimeout | timeout in milisecond | ?Number | 5000 |
Logger Configuration
For log4js configuration
Chain | Parameter | Description | value | default |
---|---|---|---|---|
LOGGER_CONFIG | logger_name | name of logger | *String | none |
LOGGER_CONFIG | logger_filePath | absolute path of the log file | *String | none |
LOGGER_CONFIG | logger_level | level of logs to write | ?String | all |
Database Configuration
Chain | Parameter | Description | value | default |
---|---|---|---|---|
MONGO_CONFIG | mongo_port | mongo database port | ?Number | 27017 |
MONGO_CONFIG | mongo_host | mongo database host | *String | localhost |
MONGO_CONFIG | mongo_databaseName | mongo database name | *String | none |
MONGO_CONFIG | mongo_user | mongo database username | ?String | none |
MONGO_CONFIG | mongo_password | mongo database password | ?String | none |
Server Configuration
Chain | Parameter | Description | value | default |
---|---|---|---|---|
GDS_SERVER_CONFIG | server_domainApi | domain dto object of the current app service | ?GDSDomainDTO | none |
GDS_SERVER_CONFIG | server_cors | Cors option | Object | default cors option |
GDS_SERVER_CONNECT_MULTIPARTY | server_tempDir | file directory path | *String | none |
GDS_SERVER_HTTP_LISTENER | server_port | express server http port | ?Number | 80 |
GDS_SERVER_HTTP_LISTENER | server_host | express server http host to bind | ||
GDS_SERVER_HTTPS_LISTENER | server_httpsPort | express server https port | ?Number | 443 |
GDS_SERVER_HTTPS_LISTENER | server_host | express server https host to bind | ||
GDS_SERVER_HTTP_PROXY_LISTENER | server_proxyPort | proxy server port | ?Number | 8080 |
GDS_SERVER_HTTPS_PROXY_LISTENER | server_proxyHttpsPort | proxy server https port | ?Number | 443 |
GDS_SERVER_HTTP(S)_PROXY_LISTENER | server_addresses | target hosts | *[{host,port}] | [] |
GDS_SERVER_HTTPS_(PROXY)_LISTENER | server_privateKey_path | server privateKey (.key) file path | *String | none |
GDS_SERVER_HTTPS_(PROXY)_LISTENER | server_certificate_path | server certificate (.cert) file path | *String | none |
GDS_SERVER_HTTPS_(PROXY)_LISTENER | server_encoding | server file encoding | ?String | 'utf8' |
Cluster Configuration
Chain | Parameter | Description | value | default |
---|---|---|---|---|
CLUSTER_CONFIG | cluster_max_cpu | Number of cpu to fork | ?Number | os cpu count |
Utility
Chain | Parameter | Description | value | default |
---|---|---|---|---|
INPUT_HANDLER | util_inputMap | maps the process.argv value to a context field | *{argv[index]:String} | none |
SocketIO Listener
Chain | Parameter | Description | value | default |
---|---|---|---|---|
GDS_SERVER_SOCKET_IO_LISTENER | server_host | Http server host | String | localhost |
GDS_SERVER_SOCKET_IO_LISTENER | server_port | Http server port | String | localhost |
GDS_SERVER_SOCKET_IO_LISTENER | server_socket_events | This is where you put the events | Object: {event(String):chainName(String)} | localhost |