added listening output
All checks were successful
CI / build-test-release (push) Successful in 9m58s
All checks were successful
CI / build-test-release (push) Successful in 9m58s
This commit is contained in:
parent
70b5b8c919
commit
0dd1738e33
1 changed files with 10 additions and 5 deletions
|
|
@ -1569,16 +1569,21 @@ int Crafter::Run(int argc, char** argv) {
|
|||
"caddy, python3, python, php, ruby, busybox, npx (Node.js).");
|
||||
return 1;
|
||||
}
|
||||
if (isolated) {
|
||||
std::println("serving {} via {} at http://localhost:{}/ (cross-origin isolated)",
|
||||
absDir.string(), picked, port);
|
||||
} else {
|
||||
std::println("serving {} via {} at http://localhost:{}/", absDir.string(), picked, port);
|
||||
std::println("listening on port :{}", port);
|
||||
if (!isolated) {
|
||||
std::println(std::cerr,
|
||||
"warning: {} does not emit COOP/COEP — performance.now() will be coarse "
|
||||
"(~0.1ms). Install caddy, python3, or php for cross-origin isolation.",
|
||||
picked);
|
||||
}
|
||||
// Silence the backend's own banner/request logs so the
|
||||
// experience is identical regardless of which server is
|
||||
// picked — the line above is the only output.
|
||||
#ifdef _WIN32
|
||||
cmd += " > NUL 2>&1";
|
||||
#else
|
||||
cmd += " > /dev/null 2>&1";
|
||||
#endif
|
||||
return std::system(cmd.c_str()) == 0 ? 0 : 1;
|
||||
}
|
||||
// wasi-cli wasm — needs a standalone runtime.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue