Skip to content

Node server doesn't starts on it's own #2174

Answered by FabianLars
NitinRamnani asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, in case you (or others) still have that "problem":
The binary is not supposed to start on it's own. Imagine you have a sidecar binary which doesn't behave like a server and is supposed to be executed only in specific cases, auto-executing those would potentially be pretty bad.

You already mentioned that you have to start the server yourself, so you probably already know this, but just to be safe (and in case someone else stumbles upon this), here's an example how to spawn the server in the setup hook in rust:

tauri::Builder::default()
  .setup(|app| {
      tauri::async_runtime::spawn(async move {
          let (mut rx, mut child) = tauri::api::process::Command::new_sidecar("express")

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amrbashir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants