<% for(var i = 0; i < messages.length; i++) {%>

  <div class="dark:bg-gray-700 flex p-4 border-b border-b-gray-400">
    <div class="mr-4 flex-shrink-0">
      <img src="/images/avatar_48.png" alt="<%= auth.name %>" class="rounded-md">
    </div>
    <div>
      <div>
        <h5 class="font-bold mb-4">
          <%= auth.name %>
        </h5>

        <p>
          <%= messages[i].body%>
        </p>
      </div>
      <div class="text-xs text-gray-500 mt-3">Posted on: <%= messages[i].createdAt %>
      </div>
    </div>
  </div>

  <% } %>