When sending html files using sendFile, can you send files that are external to him?

  node.js, question

When I use sendFile to send html files, there are css and js and pictures in it, but none of them can be displayed. What should I do?

app.get('/', function (req, res) {
 Res.sendFile(__dirname plus' /canvas.html');
 !  [Picture Description ][1]


For CSS and JS files, you can set up a static directory, then put these files in, and finally write the correct path in html.

You can look at this document.