DEV Community

Cover image for Blog APP by using MongoDB +NextJs
Sooraj s
Sooraj s

Posted on

Blog APP by using MongoDB +NextJs


Blog App ❤️(Next.js + MongoDB)

Environmental variables

Environmental variables in this project include:

  • MONGODB_URI The MongoDB Connection String (with credentials and database name)
  • WEB_URI The URL of your web app.
  • CLOUDINARY_URL (optional, Cloudinary only) Cloudinary environment variable for configuration. See this.
  • NODEMAILER_CONFIG (optional, if using nodemailer only) JSON stringified nodemailer config. eg. {"service":"Gmail","auth":{"user":"","pass":"sgbxGJjklmYunbbcGHJaSDROpLKg"}}


Start the development server by running yarn dev or npm run dev. Getting started by create a .env.local file with the above variables. See Environment Variables.


This project can be deployed anywhere Next.js can be deployed. Make sure to set the environment variables using the options provided by your cloud/hosting providers.

After building using npm run build, simply start the server using npm run start.

You can also deploy this with serverless providers given the correct setup.


Please see my




Top comments (0)