Build A Contact Us Page with Next.js 13, MongoDB, and Tailwind CSS
HTML-код
- Опубликовано: 28 сен 2024
- Check out my courses: gtcoding.net/c...
Hi guys, in this video, we will create a Contact Us page form using Next JS 13, MongoDB and Tailwind CSS. We will also create input validations for our contact form. We will be using mongoose package for working with MongoDB. I hope you find this useful.
Source code: github.com/God...
Thanks for this great tutorial! Helped me so much to build my first fullstack prototype
Super useful and straightforward. Thank you!
Now if i host it on Vercel what changes I would required to make?
have you found the answer for ur question? please share if u did
Great tutorial. 👍 please do more of next js and typescript
Legend, thank you for your Work
Hi, I am getting an error in the console Failed to load resource: the server responded with a status of 404 (Not Found). How to resolve this?
please make an infinitely nested comments using nextjs and mongodb 🙏🙏
Thats Nice but handleSubmit = async (e) = {} is not working in production build will throw a error.
wonderful explanation
perfect work ..thanks a lot brother
Thanks
the source code source is not found
I fixed the link, please check it again.
23:40
inicio de la conexion a BD 14:45
The skills that you have when it comes to sharing your knowledge is extremely awesome. Thank you for creating this content. 🚀🚀🚀
Thanks a lot, brother...
Such a clean a straightforward tutorial! Amazing!!
Bro,Even if you do this,the output does not come,only the error comes ......
const mongoose = require('mongoose');
const dotenv = require('dotenv');
dotenv.config()
mongoose.connect(process.env.MONGO_URL)
.then(() => console.log("DB connected!"));
mongoose.connection.on('error',function(err){
console.log("The error is: ");
});
Thanks for video. But i am getting this error. TypeError: mongoose__WEBPACK_IMPORTED_MODULE_0___default(...).connect is not a function
Fantastic video! Finally a simple to follow Nextjs tutorial. So many of the other videos on RUclips are so bloated and just do general introduction of concepts. Thank you for the great work! Keep it up :D
Nice tutorial, try to explain codes as well like what is NextResponse and functions to connect to db... etc.
because every tutorial shows working code but very few explain those codes.
Make more videos on Next JS.
Great work keep it up 👍👍
Simple yet subtle tutorial. Thanks a lot for helping me learn how to connect to MongoDB!
very nice tutorial, Thanks !
bro,please replay in my comment....
thanks
it helped me alot..
Thank you so so so much,
I really appreciate how you explained, I was suffering from this problem for a long time, I connected mongoDB then also it was showing the same error, how use || operator that was absolutely fantastic idea and also how you checked mongoose connected that is also great idea, I am really thankful to you, I am a beginner in next.js.js
Thanks again for your help
And Happy Eid Mubarak to you and your family
Thanks. I'm glad I could help.
Code is not working 😢
i am also having error
email is required error
Please i want you to do a new tutorial as soon as possible. I want to learn how to convert figma designs to react code. I will really appreciate it, if you can create the tutorial as soon as possible
Here is a video on that: ruclips.net/video/SD2l5x00U1k/видео.html
Nice video
It was great thank you but can you make second part for this video that we can get data from mongodb and show it on page
I will create a video on CRUD operations using MongoDB and NextJS soon.
@@GTCoding also I have question about mongo_uri. You added contact_db at the end of link but I didn't understand point of that . why you added and where we need that?
const {msg} = await res.json(); i get error this line please tell me how to solve
@gtcoding
Me also
How to solve this error
MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make
sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
at _createMongoClient (E:\NEW CRUD API IN NEXT JS
ode_modules\mongoose\lib\connection.js:804:11)
at NativeConnection.openUri (E:\NEW CRUD API IN NEXT JS
ode_modules\mongoose\lib\connection.js:741:29)
at Mongoose.connect (E:\NEW CRUD API IN NEXT JS
ode_modules\mongoose\lib\index.js:404:15)
at connectDB (webpack-internal:///(sc_server)/./app/lib/mongodb.js:11:67)
at POST (webpack-internal:///(sc_server)/./app/api/contact/route.js:17:71)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async eval (webpack-internal:///(sc_server)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:253:37)
Make sure that the environment variable for MONGO_URI is set and also check whether there is any typo in accessing it in the mongoose.connect() function.