[FEATURE] Add lib/gateway.js for global namespace.