Angular Universal deployment in shared hosting cpanel node.js - node.js

I am trying to deploy dist folder in public_html and then starting a node.js application in cpanel with startup file as main.js. But always getting bad luck.
Can anyone please help with the steps to deploy succesfully??

Related

Deploy react + node.js project to IIS

I managed to deploy only the frontend (ran build command and added a site with the built folder path to IIS), I saw that iisnode is required in order to make it work..
How can i deploy the backend aswell into the IIS?

Trying to deploy PERN app in Heroku and getting 404s

I'm trying to get my app and server hosted on Heroku to work when deployed, but it's not. Client and server seem appear to be running, but the api calls are returning 404s. I'm guessing the configs are messed up somewhere.
Here is my repo: https://github.com/kpermenter/test-deploy and my Heroku settings are attached.
Any insight would be much appreciated!
This is because you haven't made the client files available publicly, you can do this by using:
app.use(express.static('../client/build'));
in the server.js file
if this doesn't work you can try creating a 'public' folder inside the server folder then copy the contents of the build inside the server/public folder and then use app.use(express.static('/public'));
and just deploy the server folder itself

How to correctly deploy a client and server Node.js project using Heroku?

I want to deploy my project using the Heroku service.
My project contain client and server folders.
On localhost everything is working fine but when I followed the Heroku instructions, I still couldn't deploy my project correctly. I followed this instructions only for the server (I added only the server files), but when I open the given URL of my
Heroku project I receive the wild card (*) msg: Page not found
I couldn't understand what im doing wrong.
client script in package.json:
server script in package.json:
Axios file in client folder:
index.js in server folder:
updated - procfile:
I added the .env variables into the Heroku config vars.
This is the first time I'm trying to deploy my project and I will appreciate your help :)

How To Deploy Angular 8 Project to Server cpanel

I have developed one application using angular 8 and nodejs(MEAN) for website.Tested in my local server, working perfectly.But i do not know how to deploy in cpanel(I have cpanel access).
Please help anyone to find solution.
My folder structure is like below:
myproject - main folder name:
client - (angular application)
server - (NodeJS script)

Hosting react app on godaddy

I bought domain and cheapest hosting on GoDaddy, but have no idea how to upload my react app to cPanel.
Uploading simple index.html into public_html works, but I haven't yet found how to proceed with react app.
Here is the project that I want to upload.
In case what I am asking is not possible, I would appreciate any other recommendations on how to get my react app going on domain I just bought.
Thanks in advance!
According to your projects package.json file, the production build command is build:prod. So if you are using npm run: npm run build:prod or if using yarn yarn build:prod.
Then your webpack.config.js states that the output production javascript bundle.js file will be in public/dist/. So you need to upload the public folder AFTER running the command above to produce bundle.js. Make sure that you keep file and folder structure the same when uploading the contents public folder.

Resources