Кто как справляется с этой проблемой?
GET '/posts/slug/'
{
post: { /* ... */ }
}
GET '/posts/slug/comments/'
{
comments: { /* ... */ }
}
GET '/posts/slug/comments/users/'
{
users: { /* ... */ }
}
GET '/posts/slug/author/'
{
author: { /* ... */ }
}
GET '/posts/slug/meta/'
{
meta: { /* ... */ }
}
GET '/posts/slug/'
{
post: { /* ... */ },
linked: {
users: { /* ... */ },
comments: { /* ... */ },
meta: { /* ... */ },
},
}
npm run build
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
AddDefaultCharset utf-8
HTML, CSS, JS(слабые знания)
const count = (max, timeout) => (function next(i) {
if (i <= max) {
setTimeout(() => {
console.log(i);
next(++i);
}, timeout(i));
}
})(0);
count(100, i => i * 5);