Developing in Node.js. Overview
With Cloud Functions, you can run applications written in Node.js
The service provides several runtime environments with different versions. We do not recommend using obsolete versions of runtime environments.
Name | Node.js version | Yandex Cloud SDK version |
Operating system |
Preloaded | Supported by the service |
---|---|---|---|---|---|
nodejs10 | 10.16.3 | 1.3.3 | Ubuntu 18.04 | No | No |
nodejs12 | 12.22.10 | 1.3.3 | Ubuntu 18.04 | No | No |
nodejs14 | 14.19.0 | 1.3.3 | Ubuntu 18.04 | No | No |
nodejs16 | 16.14.1 | None | Ubuntu 18.04 | Yes | No |
nodejs18 | 18.16.1 | None | Ubuntu 22.04 LTS | Yes | Yes |
Note
Function behavior in preloaded and normal runtime environments may differ. Review the features of function behavior in Preloaded runtime environment.
Some runtime environments have an SDK library installed by default to work with the Yandex Cloud API. For more information about how to use the SDK, see Using the SDK.
When creating a new function version, Cloud Functions will automatically install all declared dependencies required for the function to run. For more information about requirements and restrictions, see Managing Node.js function dependencies.
The runtime environment automatically loads your code and invokes the request handler you specified. It receives an incoming request and the invocation context as arguments. The context contains additional information about the function parameters.
Cloud Functions automatically captures an application's standard output streams and sends them to the centralized logging system available in Yandex Cloud. This system also logs service records about the start and end of each function and any errors that occur during its execution. For more information about the log format, see Node.js function runtime logging.
To learn more about how to write in JavaScript or how certain statements work, see the Modern JavaScript tutorial