title: NodeJS server no http for Redis subscription
body: <p>I want to develop a process that only subscribes to a Redis channel and stay alive to handle received messages.</p>
  
  <p>I wrote the following code:</p>
  
  <pre><code>var redis = require("redis");
  var sub = redis.createClient({host: process.env.REDIS_HOST});
  
  console.log('subscribing...')
  sub.on('subscribe', () =&gt; console.log('subscribed'));
  sub.on('message', (ch, msg) =&gt; console.log(`Received message on ${ch}:${msg}`));
  console.log('done')
  </code></pre>
  
  <p>But obviously it does not work: when launched it goes through all lines and dies. I think I don't need framework like Express because my process does not use http. </p>
  
  <p>How could I write a server that stay alive "forever" without using http frameworks?</p>