ScaffoldHub - v2
  • Introduction
  • Modeling
    • Two-way Relationships
  • Setup
    • Backend
    • Frontend
    • File Storage
    • Emails with SendGrid
    • Payments with Stripe
  • Debugging
  • Deployment
    • Database
      • SQL
      • MongoDB
    • Backend
      • Google Cloud - App Engine
      • Google Cloud - Run
      • Under construction...
    • Frontend
      • Firebase Hosting
      • Heroku w/ Subdomains
      • Under construction...
  • Features
    • Projects
    • Preview
    • Tenants
      • Single-Tenant
      • Multi-Tenant
      • Multi-Tenant (w/ subdomains)
    • Payments
    • Security
    • Authentication
      • Sign-in and Sign-up
      • Invitation
      • Password Reset
      • Password Change
      • Email Verification
    • Audit Logs
    • Settings
    • Internationalization (I18n)
    • Entity
      • Form
      • Filter and List
      • Export
      • Import
    • API Documentation
  • Architecture
    • Security
    • File Storage
    • Internationalization (I18n)
    • Payments
    • Typescript Support
    • Rate limiting
    • Technologies Versions
    • Under construction...
  • Recipes
    • Testing the API with Postman
    • Enterprise sign-in with WorkOS
    • Under construction...
  • Support
  • Changelog
    • Documentation
    • Scaffolds
  • Custom Development
  • Legacy Scaffolds
  • Go to ScaffoldHub
Powered by GitBook
On this page
  • Providers
  • Setup
  • Troubleshooting
  • Allowed IP addresses

Was this helpful?

  1. Deployment
  2. Database

MongoDB

PreviousSQLNextBackend

Last updated 4 years ago

Was this helpful?

Providers

You can use any provider you want, those are just recommendations.

Setup

To use ACID transactions, you will have to create the collections first.

Temporarily change the backend/.env credentials to the connection URL.

On the backend, run:

npm run db:create

Done!

Now revert the database credentials to the localhost ones.

Troubleshooting

Allowed IP addresses

Cloud database providers usually start the database blocking all external connections. You must whitelist the IPs you will use.

In case you want to allow all IPs, the pattern is usually 0.0.0.0/0.

MongoDB Atlas Database | Multi-Cloud Database ServiceMongoDB
Logo