title: How to create an HTML file using fs.writefile
body: <p>I need to create an HTML file using <code>fs.writefile</code>. I now have a txt file (<em>menuOutput.txt</em>) with all the information that I need to display on the HTML. It looks like this :</p>
  
  <p><strong>Lunch Items</strong></p>
  
  <p>17.26  bento box b - sashimi, box combo</p>
  
  <p>15.46  bento box a - chicken teriyaki, box combo</p>
  
  <p><strong>Dinner Items</strong></p>
  
  <p>6.30  vegetable sushi, 6 rolls</p>
  
  <p>8.10  tuna roll, 3 rolls</p>
  
  <p>7.11  roe, 2 rolls</p>
  
  <pre><code>Function createHTML (textFile) {
      return new Promise ((resolve, reject)=&gt;{
          fs.readFile(textFile, 'utf8', (err,data) =&gt; {
              if (err) {
                  reject(err)
              }
              resolve (data)
          })
      })
  }
  
  createHTML('menuOutput.txt') 
          .then(data=&gt;{
              fs.writeFile ('index.html', data, (err) =&gt; {
                  console.log (data)
                  if (err) {
                      if (err) throw err
                      console.log ('created')
  
                  }
              })
          })
  
  </code></pre>
  
  <p>However, my HTML file is just a single line of text, how can I implement HTML tag in the function? Or is there anything wrong with my way of thinking?</p>