Where to put util functions
Answered
Mudi posted this in #help-forum
MudiOP
Hi, quick question. I want to make a function that read/write to json file
Where to put the function file in app structure, i added thejson file and the ts file in src/util but didn't work.
Where to put the function file in app structure, i added thejson file and the ts file in src/util but didn't work.
6 Replies
@gin code?
MudiOP
something simple as this
@Mudi something simple as this
check if the file is found first
and also make sure you are in the correct dr
dir*
@gin and also make sure you are in the correct dr
MudiOP
fixed it, used
fs.readFile('./src/utils/teams.json');Answer