Migrate Static Hosting to Vercel
On this page
Important
Always refer to the official documentation of both MongoDB Atlas and Vercel for the most up-to-date and accurate information. Specific steps may vary depending on the details of your project and the technologies used.
Vercel is well-suited for hosting and web site or application, including static sites, single-page applications (SPAs), dynamic server-rendered applications, and more. It is compatible with your App Services application.
Migrating a web application from MongoDB Atlas hosting to Vercel involves a few key steps. Below is a general guide to help you through the process.
Before You Begin
As a precaution, ensure that you have a backup of your application and data before making any significant changes.
Create a Vercel account. To learn how to create deployments on Vercel, visit the official Vercel docs. We will be showing you how to deploy using Git and the Vercel CLI below.
If your application isn't already in a version control system, consider setting it up. Vercel seamlessly integrates with popular version control platforms.
Deploy with Git
Vercel documentation: Deploy with Git
Push your code to your git repository (GitHub, GitLab, BitBucket).
Import your project into Vercel.
Optionally configure your project before it's deployed.
Select the Deploy button to initiative a deployment.
Your application is deployed! (e.g. create-react-template.vercel.app)
Deploy with the Vercel CLI
Vercel documentation: Deploy from CLI
Install Vercel CLI
Install the Vercel CLI on your local machine. This allows you to deploy and manage your projects using the command line.
npm i -g vercel
Vercel documentation: https://vercel.com/docs/cli#installing-vercel-cli
When you create a deployment, Vercel automatically adds a new and unique generated URL. You can visit this URL to preview your changes in a live environment.
After deploying, your new site will automatically be assigned a .vercel.app suffixed domain. You can then add a Custom Domain of your choice, either from a third-party or purchased through Vercel.
Deployment Protection on Vercel
Vercel documentation: Deployment Protection
Vercel offers the following Deployment Protection features:
Vercel Authentication: Restricts access to your deployments to only Vercelusers with suitable access rights. Vercel Authentication is available on all plans
Password Protection: Restricts access to your deployments to only users with the correct password. Password Protection is available on the Enterprise plan, or as a paid add-on for Pro plans
Trusted IPs: Restricts access to your deployments to only users with the correct IP address. Trusted IPs is available on the Enterprise plan.
Feature | Vercel | App Services | Plan Availability (on Vercel) |
Restrict access to platform users | ✅ | ✅ | All plans |
Password protection | ✅ | 🚫 | For purchase on Pro, included in Enterprise |
Trusted IPs | ✅ | ✅ | Enterprise plan |