http.createServer((req, res) => { if (req.url === '/favicon.ico') { res.writeHead(200, { 'Content-Type': 'image/x-icon' }); return res.end(''); } return tailor.requestHandler(req, res); })
// Root Server http .createServer((req, res) => { if (req.url === '/favicon.ico') { res.writeHead(200, { 'Content-Type': 'image/x-icon' }); return res.end(''); } tailor.requestHandler(req, res); }) .listen(8080, function() { console.log('Tailor server listening on port 8080'); });
// Fragment server - Any http server that can serve fragments http .createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/html' }); res.end('<div>Fragment 1</div>'); }) .listen(8081, function() { console.log('Fragment Server listening on port 8081'); });
server = http.createServer((req, res) => { if (req.url === '/favicon.ico') { res.writeHead(200, { 'Content-Type': 'image/x-icon' }); return res.end('');
res.writeHead(200, { 'Content-Type': 'text/html' });
res.writeHead(200, { Link: `${css}, ${js}`, 'Content-Type': 'text/html'
http .createServer((request, response) => { response.writeHead(200, { 'Content-Type': 'text/html' }); response.write(buffer); response.end(); }) .listen(8081);
res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello!'); });
http.createServer((req, res) => { if (req.url !== '/keep-alive') { res.writeHead('Connection', 'close'); } res.end('Hello World!'); }).listen(8000);
// Fragment server - Any http server that can serve fragments http .createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/html' }); res.end('<div>Fragment 1</div>'); }) .listen(8081, function() { console.log('Fragment Server listening on port 8081'); });
// Root Server http .createServer((req, res) => { if (req.url === '/favicon.ico') { res.writeHead(200, { 'Content-Type': 'image/x-icon' }); return res.end(''); } tailor.requestHandler(req, res); }) .listen(8080, function() { console.log('Tailor server listening on port 8080'); });
http.createServer((req, res) => { if (req.url === '/favicon.ico') { res.writeHead(200, { 'Content-Type': 'image/x-icon' }); return res.end(''); } return tailor.requestHandler(req, res); })