Ecommerce Shopify WordPress Discussion

Unable to Fetch Published Posts from WordPress on 000webhost for Next.js Application

I am trying to fetch my published posts in my deployed wordpress website using 000webhost and use them in my nextjs application however it failed to fetch the data. is this a problem in my wordpress website or is there something else I could do to fetch the data? Here's the code snippet I'm using for fetching the data in my Next.js application: async function getData() { const res = await fetch( "http://migueldailisan.000webhostapp.com/wp-json/wp/v2/posts" ); // The return value is *not* serialized // You can return Date, Map, Set, etc. if (!res.ok) { // This will activate the closest `error.js` Error Boundary throw new Error("Failed to fetch data"); } return res.json(); } and this is the error shown: error shown I would appreciate any insights into whether the issue is related to my WordPress website or if there are additional steps I should take to troubleshoot and resolve this problem. Thank you
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.