Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node js send file from root dir

res.sendFile('public/index1.html' , { root : __dirname});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #node #js #send #file #root #dir
ADD COMMENT
Topic
Name
2+1 =