One Server(less) to Worry About: How to Build a Complete Serverless Back End with MongoDB Atlas
This is the Realm application used in the demonstration
- A MongoDB Atlas account
- A MongoDB Atlas serverless instance named serverlesss-mdb
- MongoDB Realm CLI installed on your laptop
-
Log-on to your Atlas account
-
Navigate to the project you are using and go to the API Keys tab on the Access Management page.
-
Generate a new Programmatic API Key
-
Now on your laptop's console, log-on to your Atlas account:
realm-cli login --api-key="ATLAS-API-PUBLIC-KEY" --private-api-key="ATLAS-API-PRIVATE-KEY"
- Now import the application accepting the defaults in the import wizard:
realm-cli push --local "./mdbworld-1"
NOTE: If there is an error in the import process, manually delete the Realm application and try again. A common issue is that the cluster name does not match the default serverlesss-mdb
You should see a success message similar to:
Successfully imported 'mdbworld-1-<EMPTY>'
NOTE: Notice that the identifier will be empty, and you will have to retrieve it from the Realm app configuration page.