<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:tt="http://teletype.in/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Tural Aliyev</title><generator>teletype.in</generator><description><![CDATA[Tural Aliyev]]></description><image><url>https://img1.teletype.in/files/45/38/453856e2-4deb-4947-85c0-37b0c0d1eeda.png</url><title>Tural Aliyev</title><link>https://teletype.in/@turalaliv</link></image><link>https://teletype.in/@turalaliv?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=turalaliv</link><atom:link rel="self" type="application/rss+xml" href="https://teletype.in/rss/turalaliv?offset=0"></atom:link><atom:link rel="next" type="application/rss+xml" href="https://teletype.in/rss/turalaliv?offset=10"></atom:link><atom:link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></atom:link><pubDate>Tue, 26 May 2026 06:58:12 GMT</pubDate><lastBuildDate>Tue, 26 May 2026 06:58:12 GMT</lastBuildDate><item><guid isPermaLink="true">https://teletype.in/@turalaliv/pF2v4ipETxf</guid><link>https://teletype.in/@turalaliv/pF2v4ipETxf?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=turalaliv</link><comments>https://teletype.in/@turalaliv/pF2v4ipETxf?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=turalaliv#comments</comments><dc:creator>turalaliv</dc:creator><title>Javascript challenge</title><pubDate>Sat, 13 Apr 2024 13:52:37 GMT</pubDate><description><![CDATA[const express = require('express'); const util = require('util'); const exec = util.promisify(require('child_process').exec); const app = express(); app.get('/network_health', async (req, res) =&gt; { const { timeout,ㅤ} = req.query; const checkCommands = [ 'ping -c 1 google.com', 'curl -s http://example.com/',ㅤ ]; try { await Promise.all(checkCommands.map(cmd =&gt; cmd &amp;&amp; exec(cmd, { timeout: +timeout || 5_000 }))); res.status(200); res.send('ok'); } catch(e) { res.status(500); res.send('failed'); } }); app.listen(8080);]]></description><content:encoded><![CDATA[
  <p id="uNJ7">const express = require(&#x27;express&#x27;); const util = require(&#x27;util&#x27;); const exec = util.promisify(require(&#x27;child_process&#x27;).exec); const app = express(); app.get(&#x27;/network_health&#x27;, async (req, res) =&gt; { const { timeout,ㅤ} = req.query; const checkCommands = [ &#x27;ping -c 1 google.com&#x27;, &#x27;curl -s <a href="http://example.com/" target="_blank">http://example.com/</a>&#x27;,ㅤ ]; try { await Promise.all(checkCommands.map(cmd =&gt; cmd &amp;&amp; exec(cmd, { timeout: +timeout || 5_000 }))); res.status(200); res.send(&#x27;ok&#x27;); } catch(e) { res.status(500); res.send(&#x27;failed&#x27;); } }); app.listen(8080);</p>

]]></content:encoded></item></channel></rss>