Building with Node.js¶
FunctionGraph Types¶
FunctionGraph provides 2 types of functions:
Event Functions
Event functions can be configured with event triggers and integrate a variety of products (such as object storage service OBS, distributed messaging service DMS, cloud log service LTS, etc.).
See Event Function
HTTP Functions
HTTP functions support mainstream Web application frameworks and can be accessed through a browser or called directly by a URL.
See HTTP Functions
Both types of functions can be built either from scratch or by using container images.
Building from scratch¶
Supported Node.js Runtimes for building from scratch¶
FunctionGraph currently supports the following Node.js runtimes for building functions from scratch:
Runtime |
Identifier |
Node.js compilation environment (http functions) |
|---|---|---|
NodeJS 6.10 |
Node.js6.10 |
/opt/function/runtime/nodejs6.10/rtsp/nodejs/bin/node |
NodeJS 8.10 |
Node.js8.10 |
/opt/function/runtime/nodejs8.10/rtsp/nodejs/bin/node |
NodeJS 10.16 |
Node.js10.16 |
/opt/function/runtime/nodejs10.16/rtsp/nodejs/bin/node |
NodeJS 12.13 |
Node.js12.13 |
/opt/function/runtime/nodejs12.13/rtsp/nodejs/bin/node |
NodeJS 14.18 |
Node.js14.18 |
/opt/function/runtime/nodejs14.18/rtsp/nodejs/bin/node |
NodeJS 16.17 |
Node.js16.17 |
/opt/function/runtime/nodejs16.17/rtsp/nodejs/bin/node |
NodeJS 18.20 |
Node.js18.20 |
/opt/function/runtime/nodejs18.20/rtsp/nodejs/bin/node |
NodeJS 20.15 |
Node.js20.15 |
/opt/function/runtime/nodejs20.15/rtsp/nodejs/bin/node |
Bundled third-party components integrated in the Node.js runtime¶
For bundled libraries integrated in the Node.js runtime, see Bundled Libraries.
Building using container images¶
Supported Node.js Runtimes for building using container images¶
For building functions using container images, you can use any Node.js version that meets the requirements of your custom container image.