{
    "node": {
        "name": "demo",
        "host": "localhost",
        "listen": "0.0.0.0",
        "port": 3000
    },
    "services_note": "each property of services are a service configuration, property name is the service name. <service>.active use to make the service active in this node or not",
    "services": {
        "home": {
            "note": "the service note",
            "config": "/home/setting.json",
            "url": "http://localhost",
            "authentication": {
                "bearer": {
                    "key": "${services_primary_auth_key}"
                }
            },
            "active": true
        },
        "account": {
            "note": "account service for getting token",
            "config": "/account/setting.json",
            "url": "http://localhost",
            "authentication": {
                "bearer": {
                    "key": "${services_primary_auth_key}"
                }
            },
            "active": true
        },
        "line": {
            "note": "line service for getting profile",
            "config": "/line/setting.json",
            "url": "http://localhost",
            "authentication": {
                "bearer": {
                    "key": "${services_primary_auth_key}"
                }
            },
            "active": true
        }
    },
    "cors": {
        "origin": [
            "https://cc99-2405-9800-ba01-151b-2070-8a68-5a7-575.ngrok.io"
        ]
    },
    "authentication_note": "node authentication, each property is a auth method order by setting. auth can be overrided by service authentication which will be replace the whole authentication subtype e.g. bearer will replace node keys with service level keys",
    "authentication": {
        "bearer": {
            "keys": [
                "${services_primary_auth_key}"
            ]
        },
        "jwt": {
            "secret": {
                "private_base64": "${private_key_base64}",
                "public_base64": "${public_key_base64}"
            },
            "sign": {
                "algorithm": "ES512",
                "iss": "api.demo.tld"
            },
            "verify": {
                "allowedIss": "api.demo.tld",
                "algorithms": [
                    "ES512"
                ]
            }
        }
    },
    "fastify.options note": "specify fastify option here",
    "fastify": {
        "options": {
            "http2": false,
            "logger": {
                "level": "info"
            },
            "bodyLimit": 10485760
        }
    },
    "schema_note": "use_basic:true by default to use base-schema_for_route.json, supply other schemas in config with field name as prefix and value as schema file path. that will prefix with <field name>. e.g. { $ref:demo.api_response } ",
    "schema": {
        "use_basic": true,
        "config": {
            "demo": "/schema.json"
        }
    },
    "swagger_note": "Not recommend in production server",
    "swagger": {
        "routePrefix": "/doc",
        "info": {
            "title": "micro service demo apis",
            "description": "micro service demo apis' document",
            "version": "1.0"
        }
    },
    "logger_note": "pino log options for this node",
    "logger": {
        "level": "debug"
    },
    "database": {
        "mysql": {
            "pool": {
                "connectionLimit": "%{db_connectionLimit}",
                "queueLimit": 40000,
                "host": "${db_host}",
                "user": "${db_user}",
                "password": "${db_password}",
                "database": "${db_database}",
                "charset": "utf8mb4_unicode_ci",
                "enableKeepAlive": true,
                "ssl": {
                    "ca": "/BaltimoreCyberTrustRoot.crt.pem"
                }
            },
            "monitor": {
                "note": "the test sql will run to monitor mysql, if fail the exception will be throw. so it must be fast and quick check",
                "test_sql": "SELECT 1 from users limit 1"
            }
        }
    }
}