Render is a solution for deploying your apps, and you can easily deploy an API backend; you just need to connect your GitHub repo.

Signup here and create a account → render.com

We also need mongodb database URI string. You can use MongoDB Atlas free service to use MongoDB. Here is the instruction to setup Setup MongoDB on Atlas

Render

You will see a card for Web Services and create a new web service to connect to your backend API.

  1. Select Build and deploy from a Git repository

  2. Connect a repository(build api code repo)

  3. Scroll down and change Start Command with node server.js

  4. You can select hobby projects for Free.

  5. Important step, we have to add MongoDB URI string in the Environment Variables. Variable name will be MONGODB_STRING and value you can get from your Database provider.

  1. Finally, Create Web Service and let this get deployed. When it's done you will get the API base URL like this https://buildapi-code.onrender.com/