diff --git a/src/02_Capacitor-NodeJS/04_Benutzung/02_ComplexProjects.tex b/src/02_Capacitor-NodeJS/04_Benutzung/02_ComplexProjects.tex index ad96718..db32e3f 100644 --- a/src/02_Capacitor-NodeJS/04_Benutzung/02_ComplexProjects.tex +++ b/src/02_Capacitor-NodeJS/04_Benutzung/02_ComplexProjects.tex @@ -237,6 +237,11 @@ \subsubsection{Complex Projects} // Starts the Node.js engine. NodeJS.start(); + +// Waits for the Node.js process to initialize. +NodeJS.whenReady().then(() => { + // Communicate with the Node.js process. +}); \end{minted} Manually starting the Node.js runtime provides options to override the \code{nodeDir} configuration or even the path for the main script. @@ -260,6 +265,11 @@ \subsubsection{Complex Projects} NodeJS.start(options); \end{minted} +\begin{note}[Note] + Due to limitations in the Node.js for Mobile Apps toolkit, restarting the runtime after it has finished is not supported. + \cite{nodejs-mobile:docs} +\end{note} + \newpage \paragraph{Data storage}