Angular Universal app running in shared hosting - node.js

So I have created an angular universal app and I have successfully deployed it in Heroku and it's running great. I would like to know if it is possible I can run it in a shared hosting. More specifically I have A2Hosting shared plan which supports node.js. More over which commands should I execute in the server in order to start the node server? Thank you.

Related

How can I convert a Node Js web application to a desktop application?

I have created a Node js Web application which is running on an express server. It is a web automation application which is made using puppeteer. I want this app to run in headful mode which is not possible if I deploy this on servers (for eg Heroku). So instead of deploying this application,I wanted to create a desktop app which runs this application on the local host everytime. Is there any way to convert this web application to a desktop application and run it on local host through the desktop app only?
Your best bet would be using Electron.
It is used for cross-platform apps with Nodejs and interacts like website, so you wouldn't need to rebuilt your app from scratch.

Chatbot using Api.ai nodejs angular socket.io

I have been using api.ai javascript SDK on angular to build my chat app to integrate it with the website. As this javascript sfk is deprecated I am now exploring to build the same on Node JS SDK with socket.io for real-time experience and angular for client features...
Currently, I'm following the below link to build my chat app
https://codingblast.com/chat-application-angular-socket-io/
As I am very new to Node I have lots of doubt like...
How to deploy my node and angular app on a server to host it on my website
Angular and node can it be deployed as a simple app.. if so what are the steps and how could I achieve it.
Is node is possible ti have multi threading as many users might chat with my chatbot in parallel before on angular it will be acheived by session id.. but how it is possible on the node?
Is it fine to deploy my node app on my existing apache server or should I use separate server
How can I host multiple node js chat app on a single server since each app will use a port... how much it is possible...
Which server is recommended for node deployment windows ubuntu or Linux.
Please help me...
Angular Apps are static files that can be served using any server. For NodeJS, you will need a server that supports NodeJS runtime execution environment. A simple cloud server will do. (AWS or others that you may prefer)
Angular runs on the client-side, NodeJS runs on the server-side, there is no "Simple App Deployment" (as far as I've known). You need to run the NodeJS server code which will server the REST API, and send the Angular deployment files to the client with some file server. (Even the NodeJS server can do it)
"Node.js is a single threaded language which in background uses multiple threads to execute asynchronous code" [Source]
But you can use "fork" to run parallel tasks. For chatbot, you may consider using WebSockets.
It is possible to run NodeJS with Apache server, but how you want to deploy it depends on your decision and architecture. See HERE for more information.
Link in no. 4 should have answer this this.
NodeJS can be deployed on both Windows and Linux(Ubuntu) environment. It depends on how much you can spend, and how much benefit that expenditure will bring you. (Linux server operating systems are totally free, Windows servers aren't)

Deploy Angular Universal to Shared Hosting without npm or node.js

I currently have access to an standard cPanel shared hosting, without SSH
I have an angular application running there https://www.rednots.com
However now I need the app to have server side rendering for Facebook share, I've been using Universal toolkit from https://github.com/maciejtreder/ng-toolkit and it works great in local
Now my issue is: can I deploy the Universal app the same way I've deployed the Angular client side app by uploading the dist folder? Do I need node.js installed in the server and run commands? Or is it any workaround so I don't need to use commands?
ng-toolkit is using lambda functions and api gateways to be used by the services.
Technically speaking you only need to deploy the dist folder and everything should work out of the box since you mentioned that you already tested it locally and it works which means that the lambda functions are already deployed and the services are pointing to AWS gateway properly.

Deploying React & Node.JS as a service Linux Ubuntu 14

Have a Node.Js API and a React app semi finished. Working on deploying to get the development cycle churning. Currently using npm start for viewing the react server during development. Same for the Node API. When deployed to AWS EC2 I am building in the most basic fashion, npm build pushing to a 'release' folder.
Once the deploy folder is up, I can go into it and run serve -s release
This gets me up and running. I can do the same for api server.
To get the apps running as a service, for the api, I can see how I can build a systemd process and run that with no issue.
For the react app, is there an easy way to run that server as a system... I'm new to this stack, so I might be confused. I have read in some places that once you've built your react app that you need to serve it out via apache or nginx? (e.g. in development it hosts itself, in production, you need to serve it) Is that sort of the general idea - build with local hosting, deploy with a production webhost?
Help appreciated. This is my last major issue before I can get Jenkins running a nice pipeline for deployment. Thanks!
Since you are already running a NodeJs server, It would be a good idea to host your ReactJs App in the NodeJs App itself.
You can pipline in the Jenkins to Build the ReactJs App first and the move it to static serving folder in the server and then you just need to deploy the NodeJs app in which ever environment that you want.

how to deploy nodejs rest api with express framework on production server windows

I have created a node.js rest api created using express framework for routing. I have used tutorial
Now I want to deploy that rest api on actual production server. How to achieve that thing.
I have gone through below links.
Deploy node js application with express framework on production mode --- Only for linux. I need for windows.
Deploying NodeJs Express Rest API to Windows 10 IoT -- a little bit similar problem but no solution
https://stackoverflow.com/a/38652869/2810015 -- this said to run npm start on production server after copying all of the files on server. But this is not working fine either.
Any help will be highly useful.
You use pm2?
Usually I use it to start the application. It works for both windows and linux. He leaves the service initated, and in case something happens that knocks the service up again.
You install it on the server, and instead of using it
node server.js
You use the command below
pm2 server.js start
Link: http://pm2.keymetrics.io/docs/advanced/pm2-module-system/

Resources