express-sitemap
express-sitemap copied to clipboard
Strugling to generate a dinamic sitemap for my movie website
hello I'm having trouble generating my website's sitemap
i have thousands of slugs in my database and i need to generate the sitemaps dynamically for each slug and i am so many hours without success.. is there any way to generate dynamically? my function to get all my slugs
async function getUrls() { return await Home.findAll() .then((slug) => { slug.forEach((i) => { var slugs = i.slug; console.log(slugs); }); }) .catch((error) => { console.log(error); }); } getUrls();
with this function I have all the slugs from the database, I just need to put them in the sitemap
https://mywebsite/{each slug}
sorry for my newbie question