<% const resources = Object.entries(it.data ?? {}); %>
json-server README
Available REST resources from db.json.
Resources
<% if (resources.length === 0) { %> No resources in db.json. <% } else { %> <% resources.forEach(function([name, value]) { const isCollection = Array.isArray(value); %> /<%= name %> <% if (isCollection) { %> <%= value.length %> items <% } else { %> object <% } %> <% }) %> <% } %>