text: const fs = require('fs');
  const path = require('path');
  const { stdin: input, stdout: output } = require('process');
  const process = require('process');
  const readline = require('readline');
  
  /* Write file to consonsole */
  const pathToFile = path.join(__dirname, 'text.txt');
  const writeableStream = fs.createWriteStream(pathToFile, 'utf8');
  const rl = readline.createInterface({ input, output });
  
  console.log('Enter text:');
  rl.prompt();
  
  rl.on('line', (data) => {
      if(data.trim() === 'exit')
      {
          process.exit();
      }
      writeableStream.write(data + '\n');
      rl.prompt();
  });
  
  process.on('SIGINT', function () {
      process.exit();
  });
  
  process.on('exit', () => {
      console.log(`Your text has been written to ${pathToFile}. Bye!`);
  });
  