How to deploy Front end and backend on Plesk - node.js

I am trying to deploy my Front-end React and backend Rest api's in node.js, The server is being accessed with plesk dashboard. I was successfully able to deploy my front-end following these steps by deploying build and changing root folder https://www.plesk.com/blog/product-technology/node-js-plesk-onyx/
But here I do not find a way to deploy my backend node.js rest api on different port as we do in vps via terminal, i couldn't find way to access terminal either.
On Creating subdomain and redoing the same steps to deploy node.js-plesk I get ip address not found api.domain.digital’s server IP address could not be found.

Related

Frontend app (react) unable to connect to backend URL(in node) in openshift

I am using sandbox account of openshift and deployed one react frontend and one node backend app however from frontend when i am calling backend location URL generated by openshift, frontend is crashing. i researched a little and cam eot know that both have to be on same network. How to make sure they can talk to each other? I am new to openshift please help.

Can I only deploy the server side of my react native app to Heroku?

I have a react native app that I'm building using expo. For the backend, I am using node.js and Express.
My app hierarchy is such that I have a frontend folder and a backend (server) folder. For example,
Root
|
|Frontend
|Various screens & associated files
|Server
|Routes & other files
For my project, is it possible to just host the backend and not the rest of the app? Such that when I fetch data in the frontend using HTTP requests, instead of routing through localhost (http: //RandomIP:PORT/route) I would use the heroku address as the routing address. I would also host the SQL database along with it.
I tried to follow along with the Heroku documentation, but it seemed like that was for hosting the entirety of the app / web apps instead of mobile, and I ran into constant errors.
I would like to point out that, unlike web pages, mobile apps cannot be hosted on the server and fetched on-demand. In other words, do not try to upload your react-native code to Heroku instead just upload your backend only and then make HTTP requests through the URL provided by Heroku after you have deployed your code.
Therefore go into your backend codebase, initialize a git repository and just deploy that Heroku. Also, you will need to host your SQL database on another service such as Google's Cloud SQL or Amazons AWS Database Services.

HOW to deploy a MERN APP to production, without using firebase or heroku or aws

So people, I'm planning to build a website with MERN Stack and host it from my local machine. How to do that without using aws or fire base.
How to use my machine as Backend and database(express, node and mongodb hosted in local host) for the react frontend (hosted in www.someurl.com).
PS: I have already created a site using firebase and firestore as backend.
https://t-heros.web.app/
Thanks in advance.
One thing is you need to keep your local machine 24*7 for your app to work throughout the day. And for your answer you can expose your localhost to public domain by using static IP address and routing applicable from your router with appropriate firewall rules, all this also requires effort and maybe static IP address requires purchase. With both these together your React app can access the localhost on your machine for operations.

Can't access nodejs from external ip in digital ocean

i want to deploy an vue application with express backend both on one virtual machine on digital ocean . I have successfully deploy vue application and i am able to access it with external ip but express backend is not working i started the server with pm2 but vue application which is hosted and working properly is not able to connect to express bakcend also i am not able to access it through external ip like this :3000
i have enabled port 3000 on firewall my mongo db is working and server is properly doing there stuff

Alternate of nginx server

Currently I am using aws ec2 instance to host my backend and frontend . Backend is in nodeJs and frontend is in angular. ALso using route 53 for routing . and bought domain from goDaddy.
I have used following steps for hosting.
for backend :
clone my backend files on ec2 instance.
run backend nodejs program using pm2(used to run nodejs in background)
used nginx as reverse proxy to point localhost to my sub domain.
for frontend:
cloned frontend production files on ec2 instance.
used nginx to point frontend file to my main domain.
Now nginx is little bit complex to handle for me. Is there any way to avoid nginx or to host though any other way ?
Thank you for your time.
If your frontend app uses angular, then presumably it's a 'Single Page App' that is only dynamic in the sense that it makes some kind HTTP calls to an (RESTful?) API provided by your nodeJS application.
If this is the case, then you can host the built version of the angular app in a public S3 bucket configured as a 'static' site, which will still be able to communicate with your backend via angular's HttpClient. You can use Route53 to point your bought domain at the bucket's index.html file, and also set up a CloudFront distribution if desired.
Your nodeJS app will continue to live on the EC2 instance, although you could consider either using Elastic Beanstalk to deploy the backend app for you, or at least setting up yourself a load-balancer and autoscaling group to give you fault tolerance and availability for the backend.

Resources