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 =;
//const res = await'Tweets)
  const res = await fetch(``)
  const data = await res.json()

  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 ```
``` or getStaticProps
i got undefined in console

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