D
Deno

help

How do you get the path to a file relative to the module which is referencing it?

Aabi3/24/2023
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?
Aabi3/28/2023
Ah, didn't get notified for some reason, but many thanks @iobdas 🙏

Looking for more? Join the community!