-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
34 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
const IS_MAC = process.platform === "darwin"; | ||
const IS_WINDOWS = process.platform === "win32"; | ||
const IS_LINUX = process.platform === "linux"; | ||
|
||
export { IS_MAC, IS_WINDOWS, IS_LINUX }; | ||
export const IS_MAC = process.platform === "darwin"; | ||
export const IS_WINDOWS = process.platform === "win32"; | ||
export const IS_LINUX = process.platform === "linux"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { parentPort, workerData } from "node:worker_threads"; | ||
import { app } from "$backend/index"; | ||
|
||
const port = parentPort; | ||
if (!port) throw new Error("IllegalState"); | ||
|
||
port.on("message", () => { | ||
const _port = workerData.port; | ||
try { | ||
app.listen(_port, () => { | ||
port.postMessage(`Listening on ${_port}`); | ||
}); | ||
} catch (err) { | ||
port.postMessage(`Couldnot launch express.js, reason ${err}`); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters