MongoDB connection
Unanswered
Ragdoll posted this in #help-forum
RagdollOP
Where should I call the
Currently I am calling it inside root
connect function for connecting mongodb ? Currently I am calling it inside root
page.tsx export default function Home() {
connect();
return (
<></>
);
}1 Reply
@Ragdoll Where should I call the `connect` function for connecting mongodb ?
Currently I am calling it inside root `page.tsx`
ts
export default function Home() {
connect();
return (
<></>
);
}
Tan
You can call it whenever you need to connect to database I guess. In functional scope.