//This is my index code "/" which I think is the error, which is the fetch with the localhost, what happens is that I do not know how to change that localhost:3000 when deploying to Vercel. Does anyone have a solution?
export async function getServerSideProps(ctx) {
const res = await fetch("http://localhost:3000/api/tasks");
const tasks = await res.json();
console.log(tasks);
return {
props: {
tasks,
},
};