Deploying Node.js express and MySQL application without using any cloud platform - node.js

I have my Nodejs express application running on my local computer with mysql DB. Now, I want to deploy this application to a web server.
My problem is, I haven't done this before , so I thought a quick google will give me clue and lead me somewhere. All I have found is deploying to Amazon, Azure, Heroku, Digital Ocean and so on which provides to the best of my knowledge a cloud service.
I use domain factory, they are not cloud. I use bit bucket as my source control. How do I deploy my node server on the server of domain factory.?
After some hours of search ; i found some steps but I have tried none seems to work out.
I found this information,and others but there seems not to be a clear cut guide to do this apart from using a cloud service to push your project them.
Does anyone have a link or a guide as to how I can host my application
http://www.clock.co.uk/blog/deploying-nodejs-apps

It is incredibly easy to deploy your node.js express app to Heroku.
Just follow this tutorial to understand how to deploy a node.js app to Heroku.
Once you have understood it, you will be able to deploy your app to heroku with a simple "git push heroku master".
You can continue using bitbucket as your git repo for source control. You can simply define spearate git remotes for bitbucket and Heroku.
As for mysql: There are plenty of "MySQL as a Service" solutions out there for Heroku, such as the cleardb Heroku add on.
By using the free tier for Heroku and cleardb, you can probably run your app for free on Heroku.

Related

Is there an equivalent for Heroku app logs for Netlify?

I have migrated off heroku due to their issues with github, but one thing I really found useful were the live application logs. What is the equivalent for that on Netlify, or Amplify or other PaaS products?

Deploying nodejs in our own server

I am new to nodejs. I've created a simple webservice and it works on local but by using node app/nodemon app. Well I want to publish it internet and deploy my service in our server. (We do not want to use external servers/services such as heroku, azure etc.)
As I searched, peopel mostly deployed those services. So what is the best way to deploy a WS with nodejs in your own server?
I have a windows server for now but would like to use may be in linux platform later.

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

Resources