... NetGet Documentation Gateway

Class

Gateway

Gateway(config)

Constructor

# new Gateway(config)

Initializes a new instance of the Gateway class.

Parameters:
Name Type Attributes Default Description
config Object

The configuration object for the gateway.

host Object <optional>
'localhost'

The host name on which the gateway will listen.

port number <optional>
3432

The port number on which the gateway will listen.

routes Object <optional>
{}

An object mapping domains to their respective request handlers.

domainsConfigPath string <optional>
'~/.get/domains.json'

The path to the domains configuration file.

View Source src/Gateway.js, line 52

Methods

# async initialize()

Initializes the express application with middleware, static file serving, and view engine setup.

View Source src/Gateway.js, line 68

# listen()

Starts the gateway, making it listen on the configured port.

View Source src/Gateway.js, line 127

Witness our Seal.
neurons.me