... NetGet Documentation Global

Global

Members

# constant getState

Returns the current X State.

View Source src/modules/NetGetX/xState.js, line 21

# constant initializeState

Initializes the X State with the provided data.

View Source src/modules/NetGetX/xState.js, line 11

# constant testGateway

Creates and tests the NetGet Gateway with the specified configuration.

See:

View Source tests/test.js, line 22

Example
// To run the tests:
// node tests/test.js

# constant updateState

Updates the X State with the provided data.

View Source src/modules/NetGetX/xState.js, line 29

Methods

# checkAndInstallCertbot() → {Promise.<boolean>}

Check if Certbot and Certbot NGINX plugin are installed, and install them if necessary.

View Source src/modules/NetGetX/SSL/Certbot/checkAndInstallCertbot.js, line 11

Promise resolving to true if Certbot and its NGINX plugin are installed, false otherwise.

Promise.<boolean>

# checkPermissions(dirPath, desiredMode)

Checks and corrects permissions of a directory.

Parameters:
Name Type Description
dirPath string

Path of the directory to check.

desiredMode number

Desired permission mode (e.g., 0o755).

View Source src/modules/utils/pathUtils.js, line 9

# ensureOutputPort() → {Promise.<number>}

Ensures that the output port is set in the configuration.

View Source src/modules/NetGetX/portUtils.js, line 11

The output port number.

Promise.<number>

# ensureRequiredConfig() → {Promise.<Object>}

Ensures that all required fields in the configuration are set.

View Source src/modules/NetGetX/portUtils.js, line 37

The updated user configuration object.

Promise.<Object>

# execShellCommand(cmd) → {Promise.<string>}

Executes a shell command and returns the result as a promise.

Parameters:
Name Type Description
cmd string

The command to run, with space-separated arguments.

View Source src/modules/utils/execShellCommand.js, line 8

  • A promise that resolves with the command output.
Promise.<string>

# initializeDirectories()

Initializes all necessary directories and checks their permissions.

View Source src/modules/utils/GETDirs.js, line 24

Witness our Seal.
neurons.me