I need simple help which I am not able to resolve regarding the relative path of a file. I am making this project in node and express. My file structure is:
src(folder):
database.json routes(folder): api(folder): addbook.ts Now I want to access my database file in addbook.ts using readFilesync, for that I need the relative path of the file.
src/database.jsonsrc/routes/api/addbook.ts