React JS Server
What is React JS?
More and more advancement in the coding structures is making their mark on the server that is into giving more features in an easier way. One of them is React JS. The React JS is basically a library that provides the necessary resources to build user interfaces which is reactive.
The react JS setup environment requires the node js and npm to be configured before it can be made as compatible with the react JS.
How to use React JS?
To use the React JS on your server you need to install the node js and NPM on the server first. Installing the amp lets you use most of the functionalities fed with it.
Follow the below steps to install the Node JS.
Step 1: Download the node JS from the official website the link for the same is as given below.
Step 2: Once after downloading run the installer.
Step 3: Follow the installation wizard to complete the installation of Node.js and rpm.
Step 4: Restart your computer (until you restart your computer you won't be able to run node js).
React JS VPS Plans
Virtual Private Server: The higher level of hosting services are needed when you are involved in the react js for your dynamic web pages. The VPS should be the ideal option when you feel you need more resources and privileges to run your website.
ReactJS server with Powerful SSD + RAID 10:
RAID 10 is nothing but RAID 1 + 0, It is a mixture of both RAID 1 and 0 technology to give the better read and write execution for ReactJS applications and database application. For better speed, you can opt for RAID 10 technology. By default in HostingRaja, we offer RAID 10 technology for ReactJS server packages. The normal disks offer a read and write speed of up to 100s IOPS per second, but SSD offers very good performance up to 10,000 IOPS per second. SSD + RAID 10 is the best resource for ReactJS applications and the large requirement of a computing resource.
Use ReactJS applications with Indian Datacenter and Indian IP:
HostingRaja is involved in offering high-performance, optimized and performance-tuned web application servers on numerous platforms like dedicated, VPS and cloud with Indian data center and Indian IP address. Running a ReactJS application within the Indian data center located near to your clients will help in loading much faster because of the low latency promised by HostingRaja. In HostingRaja we assure 30 to 50 milliseconds latency in India so clients anywhere in India will visit your site within 2 to 3 seconds of loading time. For more info on the React JS server contact our toll-free no 1800-123-8642.
The following steps will help you to get started with your reactjs server.
How to use React JS?
- Login as a root user using SSH. You can refer to your welcome email to check the root username and password.
- Run the below command to install nodejs
sh /scripts/nodejsinstallation.sh to install the desired version of the nodejs.
It will show the prompt like below, enter the needed option.
And run the below command for install create-react-app and serve tool
npm install -g create-react-app
npm install -g serve
After the installation login to the ovipanel UCP account
click node js module
i) If you create a website from scratch , select the domain and enter the port no which you want
Once the installation process is completed, you can see the list of nodejs configuration.
Click the terminal icon to see the options.
Click on the stop icon to stop the application using nodejs module.
By default it runs as a nodejs so we have stopped using reactjs.
ii) Login as a root and run the below command on your folder
Example: cd /home/USERNAME/Folder1
npx create-react-app my-app
The above command install the react js under the folder my-app
Then run the below command
npm run build
And run the below command
pm2 serve build 3000 --spa --name $domain_name --user $username --uid $username --gid $username --error /var/sentora/logs/nodejs/$username/$domain_name-node-error.log --output /var/sentora/logs/nodejs/$username/$domain_name-node-out.log
pm2 serve build 3000 --spa --name demoreact.com --user demoreact --uid demoreact --gid demoreact --error /var/sentora/logs/nodejs/demoreact/demoreact.com-node-error.log --output /var/sentora/logs/nodejs/demoreact/demoreact.com-node-out.log
If you want to check the out / Error log use our pm2 log module
i) Login to UCP account and click pm2 log module
ii) based on the domain name selection and log type log will be visible
Features in React Js server.
Easier App Installation - You can get started easily & create your app very easily as we have step by step guide and ready to use servers.
Different Versions - There are different versions of nodejs available. In our VPS, Cloud and Dedicated hosting plans, you will be able to select the versions between node js 10 to 14 and enjoy our super fast servers.
Uptime Guarantee - When you choose our react server services you will get a 99.99% uptime guarantee. We have used PM2 that will help you manage and keep your application online 24/7
Installation of Packages - You will install the modules according to your requirement. If you need any assistance in the installation of modules our support stall is always available at your service
i) No need for domain and port mapping in apache server.
ii) we have a user friendly log viewer too.