How to deploy your reactjs application in digital ocean cloud server

0
Posted at August 2, 2020 377 Views . 0 Saved .

Hi Everyone,

In this post we are going to learn How to Deploy ReactJS Appliation in digital ocean cloud

Step 1 Create an account in digital ocean server and use this link to get $100 credit in your account https://m.do.co/c/ea1dc5fc0341

Step 2 Create a droplet (droplet is like your normal system where you can do anything whatever you do in your normal system) and digitalocean provide different variant of linux OS, we are going to use Ubuntu

During the droplet creation you will have two option to login in your droplet or system

1 - SSH Login (Recommended)

2- Password (less secure)

we will use SSH Login, great, right ?

For linux and mac its very simple they can use their terminal and they can login in the system using ssh command eg:

But for windows there is no such facility available, now start crying.....! :(

Ok we have alternate option for windows user which is putty.....hurray

Step 3 Lets install putty for windows user and skip this step for linux or mac user

visit this page to install putty https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Afte installation of putty open puttyGen in your system and generate and ssh key also dont forget to RSA option

After generating key you can save public and private key in your system and also copy public key and paste in droplet Authentication section

Once droplet created successfully you can open your putty

Step 4 Select Session and paste your droplet ip address and select SSH radio button

Step 5 Select Connection -> SSH -> Auth and then browse your saved private ssh key

Step 6 Now lets save your configuration, give it a name and click on save, now you are ready to login

Step 7 Click on open

Step 8 digital ocean default username is root so login as root type root thats it

Step 9Give passphrase if you have given any while creating ssh key

Step 10 Once you are logged in within the System then update and upgrade your system by using linux command

Step 11 Install node using nvm (Node Virtual Manager)

Step 12 Install nginx server to serve your application

Step 13 Install pm2 to manage your nodejs application

Step 14 Setup your proxy server

India
Coding is an art and I love art
0 Comments