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)
Related
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?
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??
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 :)
I have separte angular folder and a seperate Nodejs folder for the application.
I want to deploy it in heroku but apparently ondly a nodejs app can be deployed. Is there a solution to deploy my angular/nodejs app?
Otherwise does anyone have an idea on how to combine the angular project folder inside the nodejs project folder ?
You can serve your angular app as a static content on your node js app.
This depend how your node app is built, for example with express you can just put the files in the public directory.
I have created Angular-universal app with reference to this Angular GitHub Repository. I have used node express for server-side rendering.
I have built using this command
npm run build:prod:ngc
now I got the client and the server folder in the dist folder. No other files there like index.html.
Previously I developed the angular2 app using CLI, on building that it create a dist folder with bundle.js, index.html, and CSS files. I used to upload that particular thing to shared hosting. The app was working fine. But in angular universal I am confused. I am stuck on how to proceed further for production. I have the shared hosting, Please help me how to host the project in shared hosting.
With universal you have to set up the server first and then start the server to listen at some port(80 normally :P)..
normally.. once you setup the node server on the hosting area, you can just go to your source code and start the server using cmd:-
sudo PORT = 80 npm run server (if ubuntu)
to listen at port 80 and then you can access the site then using IP/domain name.