Please what is the best way to use gersersideprops with moralis


export const getServerSideProps: GetServerSideProps = async (context) => {
 // await Moralis.start({ serverUrl, appId, masterKey })
  const id = context.query.id;
//const res = await Moralis.Cloud.run('Tweets)
  const res = await fetch(`https://5va56q8lbgwp.usemoralis.com:2083/server/functions/Tweets?_ApplicationId=LzXKHOSiXMjAf3oBj7iIREKdV1IE0APcoMgfihNE`)
  const data = await res.json()
  console.log(JSON.stringify(data))


  if (!data) {
    return {
      redirect: {
        destination: '/',
        permanent: false,
      statusCode: 301
      },
    }
  }

  return {
    props: { data }, // will be passed to the page component as props
  }
}   
my cloud function 



Moralis.Cloud.define("Tweets", async function (request)  {
    const query = new Parse.Query("Tweets");
    const result = await query.find({ useMasterKey: true });
    return result;
    });

Have you run into any errors or are you asking for other ways of doing it?

error - Error: A required parameter (profile) was not provided as a string in getStaticPaths for /profile/[profile]

Can you post your file with getStaticPaths or share a repo.

You need to return a profile string in some way here from your paths.

sir i am not using get staticpath, i am so new to this, i which i could  get a good example of how to use Moralis with ```
getServerSideProps
``` or getStaticProps
i got undefined in console

Where is this error from now? Have you changed your code?