D
Deno
A
Deno
β’
3y ago
β’
2 replies
abi
How do you get the path to a file relative to the module which is referencing it?
const
GET_PROGRAM_QUERY
=
Deno.
readFileSync
(
"./GetProgram.gql"
);
const
GET_PROGRAM_QUERY
=
Deno.
readFileSync
(
"./GetProgram.gql"
);
GetProgram
.gql is a file in the same directory as the calling module
. The above doesn
't work
. Any ideas
?
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Simpler way to read a file relative to current module?
A
abi / help
3y ago
How to get the path to the file from a deno_core op2?
A
Amy / help
9mo ago