Node.js
Runs a Node.js project in a dedicated on-device Node server; the WebView points at the local port.
When to use
Express/Fastify/Koa apps, APIs, and server-side demos.
Runtime
- Version — Node.js 18.20.x.
- Process model — runs in a dedicated
:nodejsOS process via a nativenode_launcherwrapper loadinglibnode.so, so the V8 lifecycle is isolated from the host. - Addons — custom native
.nodeextensions supported. - Managed in the Linux Environment and Runtime Management screens.
Export requirements
The exported APK embeds:
libnode_bridge.solibnode.so(16KB-aligned for Android 15+)libc++_shared.so
Missing any of these causes loadNode / loadJniBridge failure at runtime.
Core config
Backed by NodeJsConfig.
Project
- Project (
projectId/projectName,sourceProjectPath) — the Node source. - Framework (
framework) — detected framework, if any. - Node version (
nodeVersion). - Has node_modules (
hasNodeModules) — whether dependencies are bundled.
Build mode
- Build mode (
buildMode):STATIC— static siteSSR— server-side renderingAPI_BACKEND— API backend (default)FULLSTACK— full-stack
Server
- Entry file (
entryFile) — defaults toindex.js. - Port (
serverPort) — allocated through the Port Manager. - Environment variables (
envVars) — key/value pairs passed to the process.
Native addons
- Custom Node extensions (
customNodeExtensions) — add.nodeaddons, each with load order.
