skip to Main Content

How to create a database object using MongoDB with Next.js?

I followed this tutorial to set up MongoDB in my Next.js application: https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb. In a file called mongodb-config.js, I have import { MongoClient } from 'mongodb' const uri = process.env.MONGODB_URI const options = { useUnifiedTopology: true, useNewUrlParser: true, } let…

VIEW QUESTION

Nex.js Module path aliases not clickable in vscode – SEO

I'm trying to get module path aliases clickable in vscode // Ctrl+click Working fine import Layout from "src/components/layout/Layout"; // Not working import SEO from "@components/SEO"; My JSconfig.json file { "compilerOptions": { "jsx": "react", "baseUrl": ".", "paths": { "@components/*": ["/src/components/*"], "@sections/*":…

VIEW QUESTION
Back To Top
Search