process

Server scripts only. The part of Node's `process` that bundled packages such as pg and dotenv read. It is frozen, with no exit, abort, kill or event handlers, so a resource cannot stop or reconfigure the server. `global` is the resource's own global object, as in Node.

process.env

env

The server's environment variables, the same object as the server process's, for values such as a database address in `DATABASE_URL`.

process.platform

platform: string

The server's operating system: 'win32' or 'linux'.

process.arch

arch: string

The processor architecture, such as 'x64'.

process.version

version: string

The Node.js version running the server's scripts, such as 'v22.11.0'.

process.versions

versions

Versions of Node.js and its parts, such as node, v8 and openssl.

process.release

release

Node's release information, including name and LTS name.

process.pid

pid: number

The process id of the server's script host.

process.argv

argv: array

Only the Node executable's path, because the server's own arguments are not shown to resources.

process.execArgv

execArgv: array

Always empty.

process.title

title: string

Always 'kcds-resource'.

process.cwd()

process.cwd()

The resource's own folder.

process.uptime()

process.uptime()

Seconds since the script host started.

process.memoryUsage()

process.memoryUsage()

The script host's memory use in bytes: rss, heapTotal, heapUsed, external and arrayBuffers.

process.cpuUsage()

process.cpuUsage(previous)

The script host's CPU time in microseconds, as { user, system }, since start or since `previous`.

process.hrtime()

process.hrtime(previous)

A high-resolution time as [seconds, nanoseconds], or the time since `previous`. `process.hrtime.bigint()` gives nanoseconds as a bigint.

process.nextTick()

process.nextTick(callback, ...args)

Runs a callback as soon as the current code has finished, as the resource's own code, like Node's process.nextTick. Callbacks of a stopped resource do not run.

process.emitWarning()

process.emitWarning(warning)

Writes a warning to the resource's log.