Building a New Parse Server & MongoDB Atlas-Based Application

Original Source: https://www.sitepoint.com/building-new-parse-server-mongodb-atlas-based-application/

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

Whether you’re migrating from the deprecated Parse.com (api.parse.com) or building a new application, the Parse Server community is alive and strong, and since Parse Server version 2.1.11, there is support for MongoDB 3.2 which makes MongoDB Atlas an ideal back-end for Parse Server based applications.

Existing hosted Parse / api.parse.com users can migrate their back-end using Parse’s Database Migration tool directly to MongoDB Atlas using a connection string like the following (with bold items replaced with your details):

[code language=”bash”]
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 in this blog post:

How to deploy a MongoDB Atlas cluster
How to deploy the Parse Server (in our case we will show how to do so using AWS Elastic Beanstalk quick start, but updated to use the newest version of Parse Server)
How to configure Parse Server to connect to MongoDB Atlas
How to confirm connectivity

How to Set Up A New Sample Parse Server Application with A MongoDB Atlas Back End

Deploy MongoDB Atlas cluster
Consider sizing options but start small for a hello world style application. You can always scale later (MongoDB Atlas allows you to migrate to larger instances with no downtime to your database).
Register for MongoDB Atlas at mongodb.com/atlas
Build and deploy your first cluster (we’ll use a small M10 instance-sized replica set for our example, and deploy it into the US East region) Parse Server Clusters
MongoDB Atlas Cluster
We’ll Create a user with at least readWrite on the applicationDbName database (or the user with readWriteAnyDatabase@admin which gets created automatically will do) Parse Server Mongo DB Atlas

For testing purposes, we will open IP address to all IP addresses initially (0.0.0.0/0): Later we should leave only open to our application servers’ public IP addresses. Parse Server MongoDB Atlas
Choose where and how you want to deploy the Parse Server:
Many options are described here, some of which provide easier set-ups than others. AWS Elastic Beanstalk and Heroku are easy options.

Continue reading %Building a New Parse Server & MongoDB Atlas-Based Application%

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *