The Structure of my project is:
- project
- routes
admin.js
sql-requests.xml
Now, in my admin.js
I am trying to read the sql-requests.xml
file. Assuming they are on exactly the same path, this is my code:
var fs = require('fs');
var content = fs.readFileSync('./sql-requests.xml');
This has failed. Here's the list of what I have attempted:
sql-requests
sql-requests.xml
/sql-requests.xml