How to get full browser url in next js, getServerSideProps

Advertisements Now, i’m in http://localhost:3000/, but on prod i will be in a different url, for example http://example.com/, how can i get full browser url in getServerSideProps? I have to get http://localhost:3000/ or http://example.com/, if string will not contain port, it will be ok >Solution : ‘next/router’ provide a couple of methods too, which you… Read More How to get full browser url in next js, getServerSideProps

Reason: `object` ("[object Date]") cannot be serialized as JSON. Please only return JSON serializable data types

Advertisements I am using prisma and nextJS. When i try to retrieve the content from prisma in getStaticProps it does fetch the data but i can’t pass it on to the main component. export const getStaticProps = async () => { const prisma = new PrismaClient(); const newsLetters = await prisma.newsLetters.findMany(); console.log(newsLetters); return { props:… Read More Reason: `object` ("[object Date]") cannot be serialized as JSON. Please only return JSON serializable data types