Environment and configuration
Gateway CLI/environment settings and Caller GraftConfig are separate configuration domains.
Gateway process
Gateway environment variables are:
GG_DEBUG:1orTRUEenables byte-traffic console logging;GSMU_ENDPOINT: legacy public variable name that overrides the Graftcode Engine endpoint (--endpoint);GC_PROJECT_KEY: overrides--projectKey.
Store GC_PROJECT_KEY as a secret. Avoid GG_DEBUG in production because byte-level traffic can
contain sensitive invocation data.
CLI controls module/runtime selection, listener ports, optional servers, Vision, type filtering,
CORS, context, versioning, and plugin configuration. Use gg --help for the installed release.
Generated Caller package
Generated packages resolve six configuration levels, from highest to lowest priority:
- graft-specific environment variable;
- global environment variable;
- graft-specific file;
- global file;
- programmatic user configuration;
- generated library default.
Configure before the first call because the runtime context is cached.
GraftConfig.Host = "ws://localhost/ws";GraftConfig.Stateless = true;