how to send HTML file back to client - hogehoge666/syno_moments_slider GitHub Wiki
res.set('Content-Type', 'text/html');
result.send('<h2>Hello World</h2>');
- If index.html relies on external scripts, the scripts won't be sent with the index.html.
result.sendfile(__dirname + '/index.html');
- Note you need to set up a template engine and prepare a template file
res.render('index', {title: 'Hello World!'});