Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

path must be absolute or specify root to res.sendFile

res.sendFile(__dirname + '/index.html');
// or
res.sendFile('index.html', { root: __dirname });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #path #absolute #root
ADD COMMENT
Topic
Name
8+9 =