Deploying a react app using pm2 and serve

Deploying a react app using pm2 and serve

Yes, you have learned React and now you can develop a full-fledged front end application. The create-react-app helps you to set up and run a React project…

Yes, you have learned React and now you can develop a full-fledged front end application. The create-react-app helps you to set up and run a React project, including it code transpiling, basic linting, testing, and build systems. In short, you can start writing React code with minimal preparation. But once your application is done, it is time to deploy the same on the server, you are stuck and you will seek help from your backend or DevOps mates.

Wait!! Being a front end guy it seems to be difficult, but depolying your application on server is relatively easier than writing state management in redux.

In this post, we will learn how to deploy a React application on an Ubuntu 18.04 server using Node.jsserve, and pm2

pm2 is a process manager for the JavaScript runtime Node.js. This is an open-source daemon process manager that helps to manage and keep application 24/7

Prerequisites

To follow this tutorial, you’ll need the following:

  • Latest Node.js version installed on your computer or the Linux server where are you going to deploy the application.
sudo apt-get update
sudo apt-get install nodejs
node -v or node –version
npm -v or npm –version
  • create-react-app tool
npm install -g create-react-app

react

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How native is React Native? | React Native vs Native App Development

Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.

What are hooks in React JS? - INFO AT ONE

In this article, you will learn what are hooks in React JS? and when to use react hooks? Also, we will see the react hooks example.

Build a simple React Native Pokemon app with React-Navigation

As we start learning new technologies we want to start building something or work on a simple project to get a better understanding of the technology.

Share Code Between React Native and React JS

React provides support for the server-side and frontend. Today, React development services are in demand as more and more organizations are considering software solutions that are crafted from the framework.

Validating React Forms With React-Hook-Form

In this article we will learn how to Validating React Forms With React-Hook-Form . Validating inputs is very often required. For example, when you want to make sure two passwords inputs are the same, an email input should in fact be an email or that the input is not too long