I want to send multiple files to the user per response. For example the user requests the index site, and the site needs some .png´s, the css and so on.
The user only get a package with all he needs. Thats the idea.
So my idea is that it will be realize in something like this way:
res.writeHead(200, {'Content-Type': 'text/html'});
var content = fs.readFileSync(applicationPath + "index.html");
res.write(content);
content = fs.readFileSync(applicationPath + "images/logo.png");
res.write(content);
content = fs.readFileSync(applicationPath + "index.css");
res.write(content);
res.end();
Is this possible in any way? Or are there other solutions for that?
Thank you for your help and answers!