Table of Contents
How to set up a new example of how to use MongoDB Atlas backend Parse Server application
For the purposes of this post, we will use AWS Elastic Beanstalk for a quick start deployment of Parse Server by following the following URL (an AWS account required):
Frequently Asked Questions about Building New Parse Server MongoDB Atlas-based Applications
What are the benefits of migrating from Parse to MongoDB Atlas?
How to ensure a smooth migration from Parse to MongoDB Atlas?
What are the main differences between Parse and MongoDB Atlas?
How to ensure data security with MongoDB Atlas?
Can I use MongoDB Atlas with my existing Parse application?
What tools and services does MongoDB provide to assist with migration?
How does MongoDB Atlas handle scalability?
What support options do MongoDB Atlas provide?
How does MongoDB Atlas compare to other cloud database solutions?
How much does it cost to use MongoDB Atlas?
Home Technology peripherals It Industry Building a New Parse Server & MongoDB Atlas-Based Application

Building a New Parse Server & MongoDB Atlas-Based Application

Feb 16, 2025 am 11:41 AM

Building a New Parse Server & MongoDB Atlas-Based Application

Key Points

  • The Parse Server community continues to thrive and now supports MongoDB 3.2, making MongoDB Atlas an ideal backend for Parse Server-based applications. Existing users can use Parse's database migration tool to migrate directly to MongoDB Atlas.
  • To set up a new Parse Server application using the MongoDB Atlas backend, you need to deploy the MongoDB Atlas cluster, deploy Parse Server, configure Parse Server to connect to MongoDB Atlas, and confirm connectivity. AWS Elastic Beanstalk and Heroku are easy options for deploying Parse Server.
  • Migrating from Parse to MongoDB Atlas offers many advantages such as automated management tasks, powerful security features, and detailed insights into database performance and query optimization. MongoDB Atlas also provides automatic scaling of the database infrastructure to ensure your applications remain high performance and responsive.

This article was originally published on mongoDB. Thank you for supporting the partners who made SitePoint possible.

Whether you are migrating from a deprecated Parse.com (api.parse.com) or building new applications, the Parse Server community is full of vitality and has supported MongoDB since Parse Server 2.1.11 3.2, which makes MongoDB Atlas an ideal backend for Parse Server-based applications.

Existing managed Parse/api.parse.com users can use Parse's database migration tool to migrate their backend directly using the following connection string (replace bold items with your details):

<code>mongodb://username:password@node1.mongodb.net:27017,node2.mongodb.net:27017,node3.mongodb.net:27017/applicationDbName?replicaSet=clusterName-shard-0&ssl=true&authSource=admin</code>

We will learn from this blog post:

  • How to deploy MongoDB Atlas cluster
  • How to deploy Parse Server (In this case, we will show how to deploy using AWS Elastic Beanstalk Quick Start, but has been updated to use the latest version of Parse Server)
  • How to configure Parse Server to connect to MongoDB Atlas
  • How to confirm connectivity

How to set up a new example of how to use MongoDB Atlas backend Parse Server application

  1. Deploy MongoDB Atlas Cluster
  2. Consider the size option, but for hello world-style applications, start at a small scale. You can scale at any time (MongoDB Atlas allows you to migrate to larger instances without interrupting your database).
  3. Register MongoDB Atlas
  4. Build and deploy your first cluster (we will use a small M10 instance-sized replica set as an example and deploy it to the Eastern U.S. region) Building a New Parse Server & MongoDB Atlas-Based Application
  5. Building a New Parse Server & MongoDB Atlas-Based Application
  6. We will create a user with at least read and write permissions to the applicationDbName database (or automatically created users with readWriteAnyDatabase@admin permissions can also be) Building a New Parse Server & MongoDB Atlas-Based Application
  7. For testing purposes, we initially open the IP address to all IP addresses (0.0.0.0/0): later, we should only open it to the public IP address of our application server. Building a New Parse Server & MongoDB Atlas-Based Application
  8. Select where and how you want to deploy Parse Server:
  9. Many options are described here, some of which offer simpler settings than others. AWS Elastic Beanstalk and Heroku are simple options.

For the purposes of this post, we will use AWS Elastic Beanstalk for a quick start deployment of Parse Server by following the following URL (an AWS account required):

  1. Click here to view an example of a quick start deployment of AWS Elastic Beanstalk Parse Server.
  2. But we will make sure that Parse Server 2.1.12 or later is installed, for example, in parse-server-example, make sure that the package.json file contains "parse-server": "~2.2.16" (where 2.2.2. 16 is the latest version at the time of writing).
  3. Parse Server example can be downloaded from github: Building a New Parse Server & MongoDB Atlas-Based Application
  4. If we extract the Zip file, we can edit the version in package.jsonBuilding a New Parse Server & MongoDB Atlas-Based Application
  5. We set the Parse Server version to 2.2.16 (the latest version at the time of writing) Building a New Parse Server & MongoDB Atlas-Based Application
  6. We will select files in the directory and recompress them into a new Zip fileBuilding a New Parse Server & MongoDB Atlas-Based Application
  7. We will upload a new zip file so that it can be deployedBuilding a New Parse Server & MongoDB Atlas-Based Application
  8. Configure Parse Server to connect to MongoDB Atlas
  9. Inside the AWS Elastic Beanstalk UIBuilding a New Parse Server & MongoDB Atlas-Based Application
  10. We will navigate to the "Configuration" section in the menu on the leftBuilding a New Parse Server & MongoDB Atlas-Based Application
  11. We will then navigate to the "Software Configuration" section by clicking the gear icon and scroll down to the "Environmental Properties" section Building a New Parse Server & MongoDB Atlas-Based Application
  12. In the environment properties, we will use any myAppId, myFileKey, mySecretMasterKey we want (because this is a new application, so we set these).
  13. We will set up content to display near the top of our AWS Elastic Beanstalk application UI, located to the right of "URL:..."Building a New Parse Server & MongoDB Atlas-Based Application
  14. We set DATABASE_URI as follows (replace bold text with details for our specific cluster)
  15. mongodb://username:password@node1.mongodb.net:27017,node2.mongodb.net:27017,node3.mongodb.net:27017/applicationDbName?replicaSet=clusterName-shard-0&ssl=true&authSource=admin
  16. We can see that the appropriate MongoDB URI should be located in the cluster "connection" UI of MongoDB Atlas, under the driver connection section Building a New Parse Server & MongoDB Atlas-Based Application
  17. Test to confirm the connectivity of our sample application to Parse Server and MongoDB Atlas backend:
<code>mongodb://username:password@node1.mongodb.net:27017,node2.mongodb.net:27017,node3.mongodb.net:27017/applicationDbName?replicaSet=clusterName-shard-0&ssl=true&authSource=admin</code>
<code>$ curl -X POST \
> -H "X-Parse-Application-Id: newParseTest" \
> -H "Content-Type: application/json" \
> -d '{"score":1337,"playerName":"John Doe","cheatMode":false}' \
> http://parseserver-365pk-env.us-east-1.elasticbeanstalk.com/parse/classes/GameScore</code>
<code>返回:
{
  "objectId": "YMgGV6kVTP",
  "createdAt": "2016-08-26T14:54:26.580Z"
}</code>
<code>$ curl -X GET \
> -H "X-Parse-Application-Id: newParseTest" \
> -H "X-Parse-Master-Key: MASTER_KEY" \
> http://parseserver-365pk-env.us-east-1.elasticbeanstalk.com/parse/classes/GameScore</code>

You can now use the SDK to build a new application pointing to your Parse Server MongoDB Atlas instance!

Frequently Asked Questions about Building New Parse Server MongoDB Atlas-based Applications

What are the benefits of migrating from Parse to MongoDB Atlas?

Migrating from Parse to MongoDB Atlas offers several benefits. First, MongoDB Atlas is a fully managed cloud database developed by the same person who built MongoDB. It automates time-consuming management tasks such as infrastructure configuration, database setup, ensuring availability, global distribution, backup, and more. Second, MongoDB Atlas provides powerful security features including IP whitelisting, automated patching, and encryption at rest. Finally, it provides built-in operational and security best practices, providing detailed insights into database performance and query optimization.

How to ensure a smooth migration from Parse to MongoDB Atlas?

To ensure a smooth migration, planning ahead is crucial. First understand the structure of the Parse application and how it interacts with the database. Then, create a migration plan that includes a schedule, resources required, and potential risks. Test the migration process in a non-production environment before migrating to a production environment. Also, consider using MongoDB's migration tools and services to assist in this process.

What are the main differences between Parse and MongoDB Atlas?

Parse is a backend as a service (BaaS) platform that provides developers with a suite of tools for building mobile applications. MongoDB Atlas, on the other hand, is a database-as-a-service (DBaaS) platform that provides fully managed MongoDB databases in the cloud. While Parse includes features such as user management, push notifications, and social integration, MongoDB Atlas focuses on providing powerful, scalable, and secure database solutions.

How to ensure data security with MongoDB Atlas?

MongoDB Atlas provides multiple security features to protect your data. These features include network isolation using Amazon VPC, encryption at rest with your own key management system, encryption in transit with TLS, role-based access control, IP whitelisting, and automation patches.

Can I use MongoDB Atlas with my existing Parse application?

Yes, you can use MongoDB Atlas with your existing Parse application. You need to migrate your data from Parse to MongoDB Atlas and update your application to connect strings using MongoDB Atlas. This process may require some code changes, so it is important to thoroughly test before deploying to a production environment.

What tools and services does MongoDB provide to assist with migration?

MongoDB provides a variety of tools and services to assist with migration. These tools include the MongoDB Atlas Live Migration Service, which helps you migrate data from Parse to MongoDB Atlas with minimal downtime. They also provide consulting services to assist in planning and performing your migration.

How does MongoDB Atlas handle scalability?

MongoDB Atlas provides automatic scaling of database infrastructure. This means it can adapt to changes in workload and traffic patterns, ensuring your application remains high performance and responsive. You can also manually scale the cluster at any time.

What support options do MongoDB Atlas provide?

MongoDB Atlas provides 24/7 support, with a team of experts ready to assist with any issues. They also provide comprehensive documentation, tutorials, and guides to help you make the most of the platform.

How does MongoDB Atlas compare to other cloud database solutions?

MongoDB Atlas stands out for its powerful feature set, scalability and security features. It is a fully managed solution, which means it is responsible for infrastructure configuration, database setup, backup and more. It also offers global distribution, allowing you to deploy data across multiple regions for improved performance and availability.

How much does it cost to use MongoDB Atlas?

The cost of using MongoDB Atlas depends on a number of factors, including the size of the database, the number of requests issued by the application, and the area where the data is deployed. They offer a variety of pricing plans to meet different needs, including a free tier for small projects.

All image links are retained in original format.

The above is the detailed content of Building a New Parse Server & MongoDB Atlas-Based Application. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

ArtGPT

ArtGPT

AI image generator for creative art from text prompts.

Stock Market GPT

Stock Market GPT

AI powered investment research for smarter decisions

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

OpenAI’s new parental controls and mental health safeguards for ChatGPT aim to make the AI safer for teens. OpenAI’s new parental controls and mental health safeguards for ChatGPT aim to make the AI safer for teens. Sep 15, 2025 am 12:06 AM

OpenAI rolls out parental controls for ChatGPTParents can now connect with their teen’s accounts, limit features, and get alerts if emotional distress is detectedHigh-risk conversations will be handled by specially tuned models trained to support use

Google NotebookLM's AI podcast hosts can now get into an argument over your notes Google NotebookLM's AI podcast hosts can now get into an argument over your notes Sep 16, 2025 am 07:12 AM

NotebookLM by Google now features new Audio Overview formats: Brief, Critique, and DebateThese additions bring livelier interactions and structured discussions to uploaded contentThe enhancement pushes the tool closer to interactive, podcast-style AI

Microsoft warns of slow Azure traffic Microsoft warns of slow Azure traffic Sep 17, 2025 am 05:33 AM

Microsoft has issued a warning about heightened network latency affecting Azure services due to disruptions in undersea cables located in the Red Sea, forcing the company to redirect traffic through alternative routes."While network connectivity

GPT 5 vs GPT 4o: Which is Better? GPT 5 vs GPT 4o: Which is Better? Sep 18, 2025 am 03:21 AM

The latest release of GPT-5 has taken the world by storm. OpenAI’s newest flagship model has received mixed reviews – while some praise its capabilities, others highlight its shortcomings. This made me wonder: Is GPT-

FBI warns 'indiscriminate' Salt Typhoon hacking campaign has hit organizations in more than 80 countries FBI warns 'indiscriminate' Salt Typhoon hacking campaign has hit organizations in more than 80 countries Sep 14, 2025 am 12:42 AM

The FBI has released a critical security alert, warning that the infamous hacking collective known as Salt Typhoon is intensifying its cyber operations worldwide.According to the agency, this Chinese state-backed group has been conducting widespread

AI means data breaches now cost much less - but they're still a huge threat to businesses AI means data breaches now cost much less - but they're still a huge threat to businesses Sep 21, 2025 am 12:24 AM

AI is cutting the time it takes to detect and respond to data breachesIBM reports AI adopters save up to £600,000 per breach compared to non-usersJust 33% of UK organizations have implemented AI in their security strategiesRecent findings from IBM in

Codex CLI vs Gemini CLI vs Claude Code: Which is the Best? Codex CLI vs Gemini CLI vs Claude Code: Which is the Best? Sep 18, 2025 am 04:06 AM

In 2025, a number of AI programming assistants that can be accessed directly from the terminal will be released one after another. Codex CLI, Gemini CLI, and Claude Code are some of these popular tools that embed large language models into command line workflows. These programming tools are capable of generating and repairing code through natural language instructions, and are very powerful. We reviewed the performance of these three tools in different tasks to determine which one is more practical. Each assistant is based on advanced AI models such as o4-mini, Gemini 2.5 Pro or Claude Sonnet 4, designed to improve development efficiency. We put the three in the same environment and use specific metrics

The AI trust paradox: how regulated industries can stay credible in an AI-driven world The AI trust paradox: how regulated industries can stay credible in an AI-driven world Sep 21, 2025 am 12:36 AM

If you’d told a room full of risk-averse insurance executives five years ago that nearly half of UK consumers would soon welcome health advice from AI, you’d have been met with serious skepticism, if not outright laughter.Our latest report s

See all articles