I need to hide a running Deno program in the background, hiding the console. The project only runs on the Windows 10 platform,This project will be packaged as an .exe
. I want to run it without the window display. Is there a way to achieve this?
Deno compile command : deno compile --allow-all index.js --stable
//index.js
import modbus_tcp_clinet from "./modbus_tcp_clinet.js";
import html_content from "./html_content.ts";
const Path = "./configuration.json";
const configuration = await Deno.readTextFile(Path);
const currentWorkingDirectory = Deno.cwd();
let fiberConf = JSON.parse(configuration);
let modbusTcp = new modbus_tcp_clinet(fiberConf);
console.log(Deno.env.get("SW_HIDE"));
// const p = Deno.run({
// cmd: ["C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", `--app=${currentWorkingDirectory}/occ.html`],
// });
// await p.status();
// console.log(p)
const p1 = Deno.run({
cmd: [
"C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe",
`--app=http://localhost:7075/`,
],
});
await p1.status();
console.log(p1);
const server = Deno.listen({ hostname: "localhost", port: 7075 });
for await (const conn of server) {
serveHttp(conn);
}