DEV Community

Cover image for Deploying Node Application using Render
Phani Murari
Phani Murari

Posted on

Deploying Node Application using Render

Are you ready to take your Node.js application to the next level 🚀?

If you're looking for a hassle-free simple step by step way to deploy your app and get it up and running in minutes, then you're in luck!

In this post, we're going to explore how to deploy a Node.js application using Render, a powerful cloud platform that makes deployment fast, easy, and reliable.

Whether you're a seasoned developer or just starting out, you'll find everything you need to know to get your application up and running in no time.

In this post we learn how to deploy a simple login Node application using the render.

Let's deploy the below sample Login Application to render.

Github Repository URL :

https://github.com/phanimurari/dev-post-sample-login-app.git

I highly recommend trying out the above GitHub repository and getting hands-on experience by deploying a sample login application locally.

Let's jump into deploying part

Step1:

Create a Account on Render

It is highly recommended to register on Render using your GitHub account as it enables seamless integration of your project repositories on GitHub with the Render services.

This will streamline the process of deploying and managing your applications on Render, allowing for a more efficient and convenient workflow.

Step2:

Click on New+ and select Web Service

Refer to the below screenshot for a better understanding.

Image description

Step3:

Let's create your project repository by clicking on the connect button.

Image description

Step 4:

  • Give a unique name for deployed node application

  • Select your Region

  • Select the branch where your code exists in the GitHub repository.

  • Select Run Time as Node(As your deploying the Node application)

  • Select Build Command that build your Node application, In my case it is installing the Node Modules.

Execute the below command to install the Node Modules.

npm install
Enter fullscreen mode Exit fullscreen mode
  • Select Start Command that start your node application.

In my case executing the below command will start my node application.

nodemon index.js
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

  • Click on the Create Web Service button to create the web service.

Step 5

You simply wait for some time, till your deployed node application is built and deployed succesfully.

Image description

If any error during the build or depolying, you can check out those errors in the Logs as shown in the reference Screenshot.

Image description

Step 6

Testing the deployed Node Application APIs

Register API

Image description

Login API

Image description

I love to appreciate your enthusiasm to learn more.

Thanks for Reading!

I'm Phani Murari

Instagram
LinkedIn

Top comments (5)

Collapse
 
lazarkulasevic profile image
Lazar Kulasevic

You should run node index.js in production, nodemon is for development purposes.

Collapse
 
bsobek profile image
Břetislav Sobek

Thank you for the instructions.

Collapse
 
phanimurari profile image
Phani Murari

You're Welcome!

Collapse
 
aimankm profile image
Aiman Khaled Maqram • Edited

For typescript, you can use it like this
Build Command: yarn --frozen-lockfile install;yarn build
Start Command:node dist/index.js

Image description

Collapse
 
prashanthsys profile image
Prashanth

Image description
getting this page on clicking 4 step create web servers why need help