D
Deno
B
Deno
β’
4y ago
β’
2 replies
Blockzilla
Possible to check of a file is being run as worker?
if (import.meta.main) { main() }
if (import.meta.main) { main() }
is there a way to disable calling
main()
main()
if the file is being run as worker
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,950
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
main()
main()
if
(
import
.
meta
.main) {
main
()
}
if
(
import
.
meta
.main) {
main
()
}
Similar Threads
How to check if stdin is a file?
M
m4rc3l05 / help
16mo ago
Is possible to spawn a worker inside an http?
I
IsaacR943 / help
2mo ago
`deno run` as a library
P
palmik / help
3y ago
How to open a file as blob?
C
CodyC / help
2y ago