How to deploy node.js app without heroku aws or other cloud computing - node.js

I have plenty of spare machines that i could use for computing, what would be the best way to deploy a nodeJS app to the web without going through a middle man (aws, azure, heroku)?

Related

Is it possible to deploy NodeJS app without SSH access?

According to that answer hosting that allows deploy NodeJS apps
will generally give you (at a minimum) shell access (via SSH) which
you can use to run the Node.JS application
But is it possible to deploy NodeJS application without access to ssh? On my hosting plan, I have only FTP access and I was wandering if I can do that or should I change hosting provider?
If your app is fully static you can build it into static js files (i.e. npm run build in vue.js) and then it should work on ftp hosting. Note, however, that in this case if your usage is low you can use something like Google App Engine or Netlify and essentially get free hosting for your static app.
However, if your app involves some back-end operations, i.e. express.js then you need to be able to run node.js server itself and you need a VPS-based or container-based hosting.
Feel free to reach out to me via discord here and ask more questions - https://discord.gg/UTxjBf9juQ.

Azure : Deploy Angular(Front-End) & Node (Back-End) app without VM

I am new to Azure. I have never used azure. So don't mind if this is some silly question.
I have a client who also doesn't know much about deploying.
I have angular/node apps. He wants to host on Azure WITHOUT using a VM.
I am not sure about azure. So i don't know how to deploy without VM.
I know to deploy with RDP(Remote Desktop).
Can anyone help me with this. Is there a way to deploy angular & node app without VM?
Is there any specific documentation for it? Which services will i need in Azure?
Thanks in advance!
Except Azure VM, there are normally two ways to deploy Node.js app on Azure which include App Service - Web Apps and Web Apps for Containers, please see the links below to know these guides.
For deploying Node.js app on Azure Web Apps.
Create a Node.js web app in Azure
Tutorial: Build a Node.js and MongoDB web app in Azure
To deploy the app with a ZIP file, or via FTP, cloud sync, or deploy continuously, or from local Git, etc. You can see more at the left sidebar of these pages.
For deploying Node.js app on Azure Web App for Containers, it's a simple way to deploy the app on Azure as similiar as on local docker.
Create a Node.js web app in Azure App Service on Linux
Build a Node.js and MongoDB web app in Azure App Service on Linux
To deploy via FTP, cloud sync, or deploy continuously, or from local git, etc. Also, you can see more at the left sidebar of these pages.
Some important tools will help deploying easier.
Deploy via VSCode, you can refer to these offical documents for WebApp(App Services) or Container(Docker Images).
To deploy on WebApp not Container, Kudu is a common tool for debuging and deployment. Meanwhile, for Node.js app, we need to use iisnode to connect IIS as revese proxy for your app, and configure the web.config file via follow the kudu wiki document. The Kudu wiki is very useful and valuable for new to Azure.
There are more details for this topic which can not be listed one by one at here, but the above these are necessary. The offical guide for Javascript developers is helpful for new to Azure.
Jay Gong posted a great answer for hosting on Azure. However, you might want to ask your client if s/he means s/he wants a micro services architecture. For more information on micro services, check out this link.
The other viable option would be an App Service (which is an Azure service that manages deployment and abstracts a lot away, but there's a VM under the hood)? Without a VM for hosting, it would be rather difficult to do anything in the cloud on Azure - the only other option is local hosting, which would be without Azure. I would argue that it ruins the purpose of using cloud services, as it seems your client is confused.

How to host a nodejs app on ECS?

Iam looking to host a nodejs app on ECS. On local dev i use ngrok to expose port 3000 and it seems to work well. Now i would like to host it. Is dockerizing mandatory? What would be the steps to host it on amazon ecs if the app is dockerized?
I would also like to know if hosting on ecs is possible without dockerizing.
I would suggest you if you want to go this way to start an EB Instance.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs.container.html
And you can deploy your application using CodeShip or use the traditional way in EB where you upload and deploy the code ( I suggest you use CodeShip ).
Another way to do it, and it might end it up being free is Heroku, it's an amazing and easy cloud service where you can deploy your application and build a continuous integration with GitHub, it takes care of everything to you.
This is the walkthrough for Node.Js apps:
https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction
Dockerizing is not mandatory at all, you can do it if you like, the roadmap to deploy the app won't change.

Deploy MEAN application

I just learned the MEAN stack and I locally developed/tested an app. Now, I want to deploy this application to the internet so the world can use it. I don't know how to do this and am lost.
So far, this is what I think is needed. Please correct me if I'm wrong.
1) Purchase a domain (done using Google domains)
2) Find a host for that domain (using Hostgator)
3) Deploy mean app to a cloud service (like Azure, AWS, Heroku, Digital Ocean)
4) ???
5) Fiddle with some settings so the user can access my web app on mydomain.com
What is a recommended cloud service to use? This is my first time doing this so help appreciated!
There are a lot of articles on the web already(why not google first?)!
Here are some:
Deploy MEAN
Deploy Your MEAN Stack Apps to Heroku
Running Mean.js App on Azure App Services with Continuous Integration and Delivery
Bossable - MEAN Stack Deploy on Azure
John Papa - Deploying Angular on Azure
Deploying a MEAN App to Amazon EC2 (Part 1)
Deploying a MEAN App
Stackify - Why Azure Deployment Slots are Awesome and How to Use Them
[express, angular, mongo, mongoose, deploy, digitalocean, ssh, Heroku, node]
I would suggest you to use AWS for these kind of stacks and in AWS you can use beanstalk and you don't need to care about management.
https://aws.amazon.com

Which azure option is good for my TCP game server using node.js?

I am new to Microsoft windows azure cloud and want to run my game server using node.js in azure cloud. I read the windows azure Node.js Developer Center site and it seems my server can run in azure cloud multiple ways.
Which azure option is good for my TCP game server using node.js?
Three options:
Web Site
Cloud Service
Virtual Machine
Web Sites are essentially shared web hosting, which only supports HTTP, so not an option for you.
Cloud Services are probably what you want. This is the core PaaS offering on Windows Azure. It will let you run pretty much whatever you want, as long as it runs on Windows. It supports TCP endpoints. There's are pretty nice tools for Node.js. There are two flavors of running Node in a Cloud Service: a web role or a worker role. Web roles use IIS and run Node.js behind it. That won't work for your raw TCP connections, so you'll want to use a worker role. A worker role will simply launch your Node app and leave it running forever.
Virtual Machines would work fine too, but they don't provide much value compared to Cloud Services. In a cloud service, you can spin up new VMs on demand, a load balancer sits in front of your app distributing traffic, your app will get restarted if it ever crashes, you can have your VM automatically patched without downtime, etc. Unless you can't run in a cloud service for some reason, you rarely want to use a raw VM.
tl;dr You want a worker role in a cloud service. :-)
Windows Azure does have a toolkit for Social Games on Github, this might help you in you in your endeavours, not sure it supports Node.js mind you, there should be some takeaways to help you.
https://github.com/WindowsAzure-Toolkits/wa-toolkit-games
This blog post gives a good breakdown on where to run what and use cases for each.
http://blogs.msdn.com/b/silverlining/archive/2012/06/27/windows-azure-websites-web-roles-and-vms-when-to-use-which.aspx
It really depends on your application, what backend does it have, number of users, performance, latency etc...
A word of warning though, running Node.js on Windows is mostly fine but there are several libraries that will not work. Don't know if it's a hard requirement that you use Azure but there are other Node hosting solutions out there.
Nodejitsu
Nodester
Those are only two, there are more out there.
Disclaimer: I'm building a Node.js hosting solution, modulus.io.

Resources